TCGAbiolinks HT-Seq count
0
0
Entering edit mode
3.3 years ago
Rob ▴ 170

Hi friends I downloaded RNA seq and its related clinical data from biolink. with this code I get clinical data but when I use write.csv(clinical, clinical) the result file is messy and columns data are mixed. How can I get the clinical file correctly? this is my code:

library(TCGAbiolinks)
library(SummarizedExperiment)
BiocManager::install("BioinformaticsFMRP/TCGAbiolinks")

CancerProject <- "TCGA-KIRC"
query <- GDCquery(project = CancerProject,
                  data.category = "Transcriptome Profiling",
                  data.type = "Gene Expression Quantification",
                  sample.type = c("Primary Tumor"),
                  workflow.type = "HTSeq - Counts")
#download raw counts for DESEq2
GDCdownload(query)
data <- GDCprepare(query, save = TRUE, save.filename = "expression.rda")
rna <- as.data.frame(SummarizedExperiment::assay(data)) # exp matrix
write.csv(rna, "htseqRNA.csv")
clinical <- data.frame(data@colData) # associated clinical data
write.csv(clinical, "clinical.csv")
RNA-Seq gene • 645 views
ADD COMMENT

Login before adding your answer.

Traffic: 1981 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6