conversion of data.frame object to SummarizedExperiment object
1
0
Entering edit mode
3.5 years ago

I'm using GDC data and analyzing it with TCGAbiolinks package in R. I have one object from GDCprepare, and i have saved it as a data.frame and not as a summarizedExperiment object.

So now i want that data.frame object to convert into SummarizedExperiment object. I have referred to the makeSummarizedExperimentFromDataFrame function but i could not able to do it,

So if anyone knows how to convert the data.frame object to SummarizedExperiment object please help me. A sample R code would be very helpful.

Thank you so much.

R GDC SummarizedExperiment TCGAbiolinks • 2.4k views
1
Entering edit mode
3.5 years ago
svlachavas ▴ 750

Dear Ankita,

For example, a query for the COAD dataset, in order to download raw HTSEQ RNA-Seq counts for the provinsional data:

hg38.coad <- GDCquery(project = "TCGA-COAD",
data.category = "Transcriptome Profiling",
data.type = "Gene Expression Quantification",
workflow.type = "HTSeq - Counts",
experimental.strategy = "RNA-Seq",
sample.type = c("Primary solid Tumor","Solid Tissue Normal"))



So, this code chuck automatically saves your raw counts into a ranged Summarized experiment:

coad_data
class: RangedSummarizedExperiment
dim: 56963 506
assays(1): HTSeq - Counts
rownames(56963): ENSG00000000003 ENSG00000000005 ... ENSG00000281912
ENSG00000281920
rowData names(3): ensembl_gene_id external_gene_name
original_ensembl_gene_id
colnames(506): TCGA-3L-AA1B-01A-11R-A37K-07
TCGA-DM-A1D8-01A-11R-A155-07 ... TCGA-AA-3675-01A-02R-0905-07
TCGA-G4-6323-01A-11R-1723-07
colData names(101): sample patient ...
subtype_vascular_invasion_present subtype_vital_status


Best,

Efstathios-Iason

0
Entering edit mode

Hello Sir,

I know the GDCprepare automatically saves the raw counts into SummarizedExperiment, But whenever i run that GDCprepare step it throws error, telling as cannot connect to biomaRt website. I have posted one question in biostars and bioconductor forums regarding this GDCprepare error, you can find it here (help with GDCprepare ) and (https://support.bioconductor.org/p/106682/). because every time i run this it shows error.

So i was thinking to save the GDCpraper object as data.frame by setting SummarizedExperiment to false and then converting it to Summarizedexperiment object.

I think the problem is more clear this time, i hope this helps you to understand my problem. Thank you very much for your response, but if you know how to convert from data.frame to SummarizedExperiment then it will be really my happy day.

Thank you so much.