学会使用R包cgdsr访问cBioPortal

最后发布时间:2021-06-26 11:25:31 浏览量:

基本使用

点击下载

library(devtools) 
#install_github("cBioPortal/cgdsr")

library("cgdsr")
mycgds = CGDS("http://www.cbioportal.org/")
test(mycgds) 

# 查看肿瘤相关研究
(mycancerstuy = getCancerStudies(mycgds)[,c(1,2)])
#cancer_study_id                                                       name
#1       paac_jhu_2014 Acinar Cell Carcinoma of the Pancreas (JHU, J Pathol 2014)
#2 mel_tsam_liang_2017                     Acral Melanoma (TGEN, Genome Res 2017)

(mycancerstudy = getCancerStudies(mycgds)[106,1])
# gbm_tcga


(mygeneticprofile = getGeneticProfiles(mycgds,mycancerstudy)[,c(1,2)])
#genetic_profile_id                                                        genetic_profile_name
#1                                       gbm_tcga_rppa                                                   Protein expression (RPPA)
#2                               gbm_tcga_rppa_Zscores                                          Protein expression z-scores (RPPA)
#3                                     gbm_tcga_gistic                                Putative copy-number alterations from GISTIC
#4                                  gbm_tcga_mrna_U133                                      mRNA expression (U133 microarray only)
#5                          gbm_tcga_mrna_U133_Zscores mRNA expression z-scores relative to diploid samples (U133 microarray only)
#6                                       gbm_tcga_mrna                                                mRNA expression (microarray)
#7                        gbm_tcga_mrna_median_Zscores           mRNA expression z-scores relative to diploid samples (microarray)
#8                            gbm_tcga_rna_seq_v2_mrna                                           mRNA expression (RNA Seq V2 RSEM)
#9             gbm_tcga_rna_seq_v2_mrna_median_Zscores      mRNA expression z-scores relative to diploid samples (RNA Seq V2 RSEM)
#10                                gbm_tcga_linear_CNA                                   Capped relative linear copy-number values
#11                          gbm_tcga_methylation_hm27                                                          Methylation (HM27)
#12                         gbm_tcga_methylation_hm450                                                         Methylation (HM450)
#13                                 gbm_tcga_mutations                                                                   Mutations
#14 gbm_tcga_rna_seq_v2_mrna_median_all_sample_Zscores      mRNA expression z-scores relative to all samples (log RNA Seq V2 RSEM)
#15            gbm_tcga_mrna_median_all_sample_Zscores           mRNA expression z-scores relative to all samples (log microarray)
#16              gbm_tcga_mrna_U133_all_sample_Zscores     mRNA expression z-scores relative to all samples (U133 microarray only)
(mygeneticprofile = getGeneticProfiles(mycgds,mycancerstudy)[3,1])
# gbm_tcga_gistic
 
(mycaselist = getCaseLists(mycgds,mycancerstudy)[,c(1,2)])
#case_list_id                              case_list_name
#1                gbm_tcga_all                                 All samples
#2      gbm_tcga_3way_complete                            Complete samples
#3                gbm_tcga_cna                       Samples with CNA data
#4    gbm_tcga_methylation_all               Samples with methylation data
#5   gbm_tcga_methylation_hm27        Samples with methylation data (HM27)
#6  gbm_tcga_methylation_hm450       Samples with methylation data (HM450)
#7               gbm_tcga_mrna Samples with mRNA data (Agilent microarray)
#8    gbm_tcga_rna_seq_v2_mrna         Samples with mRNA data (RNA Seq V2)
#9          gbm_tcga_mrna_U133    Samples with mRNA data (U133 microarray)
#10            gbm_tcga_cnaseq          Samples with mutation and CNA data
#11         gbm_tcga_sequenced                  Samples with mutation data
#12              gbm_tcga_rppa            Samples with protein data (RPPA)


(mycaselist = getCaseLists(mycgds,mycancerstudy)[1,1])
# gbm_tcga_all


(getProfileData(mycgds,c('BRCA1','BRCA2'),mygeneticprofile,mycaselist))
#BRCA1 BRCA2
#TCGA.02.0001.01    -1     1
#TCGA.02.0003.01     0     0
#TCGA.02.0006.01     0    -1


(getProfileData(mycgds,c('BRCA1'),c("gbm_tcga_mrna","gbm_tcga_gistic"),mycaselist))
#gbm_tcga_mrna gbm_tcga_gistic
#TCGA.02.0001.01           NaN              -1
#TCGA.02.0003.01           NaN               0
#TCGA.02.0006.01           NaN               0



(myclinicaldata = getClinicalData(mycgds,mycaselist)[1:3,1:3])
#AGE CANCER_TYPE    CANCER_TYPE_DETAILED
#TCGA.32.4213.01  47      Glioma Glioblastoma Multiforme
#TCGA.14.1452.01  60      Glioma Glioblastoma Multiforme
#TCGA.08.0509.01  63      Glioma Glioblastoma Multiforme

browseVignettes("cgdsr")

参考

快捷入口
R 思维导图 浏览PDF 下载PDF
分享到:
标签