BioinformaticsFMRP / TCGAbiolinks

TCGAbiolinks
http://bioconductor.org/packages/devel/bioc/vignettes/TCGAbiolinks/inst/doc/index.html
298 stars 112 forks source link

How to extract colnames form RangedSummarizedExperiment #457

Closed ivy-yuan closed 3 years ago

ivy-yuan commented 3 years ago

I downloaded liver RNA-seq processed data from GTEx by using TCGAquery_recount2, and I got a returned object called liver.rec.I want to know the detail about colnames of liver.rec,but I don't know how to do.Does anyone know how to realize it?

`>liver.rec <-TCGAquery_recount2(project = "gtex", tissue = "liver")

liver $gtex_liver class: RangedSummarizedExperiment dim: 58037 136 metadata(0): assays(1): counts rownames(58037): ENSG00000000003.14 ENSG00000000005.5 ... ENSG00000283698.1 ENSG00000283699.1 rowData names(3): gene_id bp_length symbol colnames(136): SRR815140 SRR1349562 ... SRR1447547 SRR1354053 colData names(82): project sample ... title characteristics`

tiagochst commented 3 years ago

It looks like the return is a list. You can access the samples information with colData function from SummarizedExperiment library.

liver.rec <-TCGAquery_recount2(project = "gtex", tissue = "liver")
library(SummarizedExperiment)
gtex_liver <- liver.rec$gtex_liver
colData(gtex_liver)