## ----include = FALSE---------------------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ## ----setup-------------------------------------------------------------------- library(pgxRpi) ## ----------------------------------------------------------------------------- # access all filters all_filters <- pgxFilter() head(all_filters) ## ----------------------------------------------------------------------------- # get all prefix all_prefix <- pgxFilter(return_all_prefix = TRUE) all_prefix ## ----------------------------------------------------------------------------- # access specific filters based on prefix ncit_filters <- pgxFilter(prefix="NCIT") head(ncit_filters) ## ----------------------------------------------------------------------------- biosamples <- pgxLoader(type="biosamples", filters = "NCIT:C7541") # data looks like this biosamples[1:5,] ## ----------------------------------------------------------------------------- biosamples_2 <- pgxLoader(type="biosamples", biosample_id = "pgxbs-kftvki7h",individual_id = "pgxind-kftx6ltu") biosamples_2 ## ----------------------------------------------------------------------------- biosamples_3 <- pgxLoader(type="biosamples", filters = "NCIT:C7541",skip=0, limit = 10) # Dimension: Number of samples * features print(dim(biosamples)) print(dim(biosamples_3)) ## ----------------------------------------------------------------------------- unique(biosamples$histological_diagnosis_id) ## ----------------------------------------------------------------------------- biosamples_4 <- pgxLoader(type="biosamples", filters = "NCIT:C7541",codematches = TRUE) unique(biosamples_4$histological_diagnosis_id) ## ----------------------------------------------------------------------------- pgxLoader(type="sample_count",filters = "NCIT:C7541") ## ----------------------------------------------------------------------------- individuals <- pgxLoader(type="individuals",individual_id = "pgxind-kftx26ml",filters="NCIT:C7541") # data looks like this individuals[173:174,] ## ----------------------------------------------------------------------------- analyses <- pgxLoader(type="analyses",biosample_id = c("pgxbs-kftvik5i","pgxbs-kftvik96")) analyses ## ----------------------------------------------------------------------------- # query metadata of individuals with lung adenocarcinoma luad_inds <- pgxLoader(type="individual",filters="NCIT:C3512") # use 65 years old as the splitting condition pgxMetaplot(data=luad_inds, group_id="age_iso", condition="P65Y", pval=TRUE) ## ----echo = FALSE------------------------------------------------------------- sessionInfo()