Error in summarizing data with summarizedExperiment due to differece in data sizes
#––––––––––––––––––––––––––––
# Obtaining DNA methylation
#––––––––––––––––––––––––––––
library(TCGAbiolinks)
library(stringr)
# Samples
matched_met_exp <- function(project, n = NULL){
message("Download DNA methylation information")
met450k <- GDCquery(project = project,
data.category = "DNA methylation",
platform = "Illumina Human Methylation 450",
legacy = TRUE,
sample.type = c("Primary Tumor"))
met450k.tp <- met450k$results[[1]]$cases
# get primary solid tumor samples: RNAseq
message("Download gene expression information")
exp <- GDCquery(project = project,
data.category = "Gene expression",
data.type = "Gene expression quantification",
platform = "Illumina HiSeq",
file.type = "results",
sample.type = c("Primary Tumor"),
legacy = TRUE)
exp.tp <- exp$results[[1]]$cases
print(exp.tp[1:10])
# Get patients with samples in both platforms
patients <- unique(substr(exp.tp,1,15)[substr(exp.tp,1,12) %in% substr(met450k.tp,1,12)])
if(!is.null(n)) patients <- patients[1:n] # get only n samples
return(patients)
}
luad_samples <- matched_met_exp("TCGA-LUAD", n = 10)
lusc_samples <- matched_met_exp("TCGA-LUSC", n = 10)
#–––––––––––––––––––––––––––––––––––
# 1 – Methylation
# ––––––––––––––––––––––––––––––––––
# For methylation it is quicker in this case to download the tar.gz file
# and get the samples we want instead of downloading files by files
#LUAD
query_meth_luad <- GDCquery(project = "TCGA-LUAD",
data.category = "DNA methylation",
platform = "Illumina Human Methylation 450",
legacy = T,
barcode = luad_samples )
GDCdownload(query = query_meth_luad,
method = 'client')
tcga_meth_luad <- GDCprepare(query_meth_luad, save = F)
#LUSC
query_meth_lusc <- GDCquery(project = "TCGA-LUSC",
data.category = "DNA methylation",
platform = "Illumina Human Methylation 450",
legacy = T,
barcode = lusc_samples )
GDCdownload(query = query_meth_lusc,
method = 'client')
tcga_meth_lusc <- GDCprepare(query_meth_lusc, save = F)
summary_meth_luad <- SummarizedExperiment::cbind(tcga_meth_luad, tcga_meth_lusc)
I have run this code, and everything was fine until the last line of the code: summarizedExperiment::cbind
Here the following arguments are appeared:
> summary_meth_luad <- SummarizedExperiment::cbind(tcga_meth_luad, tcga_meth_lusc)
Error in .aggregate_and_align_all_colnames(all_colnames, strict.colnames = strict.colnames) :
the DFrame objects to combine must have the same column names
How can I solve this problem? Please, anyone help me!
• 1,693 views
•
link
0 answers
No answers yet.
Log in to answer this question.
What is the output of
colnames(colData(tcga_meth_luad)); colnames(colData(tcga_meth_lusc))?I think the column numbers are not equal in the samples which may cause the problem. IF it is, then how can I solve the problem?