Can i add an experiment to an existing MultiAssayExperiment?
2
0
Entering edit mode
@mariozanfardino-15232
Last seen 3.7 years ago
Naples (Italy)

Hi,
There are methods to add, to an existing MultiassayExperiment data structure, a new experiment?
I have a multiassayExperiment created by curatedTCGAdata with  "BRCA_Mutation-20160128", "BRCA_CNASNP-20160128" and "BRCA_RNASeqGene-20160128" in the ExperimentList.
I would add a new experiment in this list. In particular an experiment based on data extract from TCIA database (in data.frame or matrix format).  
Do you think it is possible? there are method that you can suggest me? 
 

 

mutiassayexperiment tcga tcia • 995 views
ADD COMMENT
2
Entering edit mode
@marcel-ramos-7325
Last seen 6 days ago
United States

Hi Mario,

Thank you for posting on the support site.

Yes, there is a method to add an experiment using the c function. This works quite easily if this experiment has the same sample composition and order as another experiment. You can then use:

c(mymultiassay, newExpAssay = tcia, mapFrom = 1L)

Otherwise you would have to provide a sampleMap for the experiment to be integrated into your current MultiAssayExperiment.

Best regards, Marcel

ADD COMMENT
1
Entering edit mode
@mariozanfardino-15232
Last seen 3.7 years ago
Naples (Italy)

Thank you Marcel,

An example solution based on your post:

 

# Create a new summarizedExperiment example
nrows <- 20
ncols <- 5
counts <- matrix(runif(nrows * ncols, 1, 1e4), nrows)

colData <- DataFrame(f1=c(runif(5, 0, 100)),
                     f2=c(sample(0:1, 5, replace=T)),
                     row.names=c("TCGA-A1-A0SB",
                                 "TCGA-A1-A0SD",
                                 "TCGA-A1-A0SE",
                                 "TCGA-A1-A0SF",
                                 "TCGA-A1-A0SG"))

mySummExp <- SummarizedExperiment(assays=list(counts=counts), 
                                  colData=colData)

#Add new summarized experiment to exisiting MultiAssayExperiment
BRCA_TCGA_plus <- c(BRCA_TCGA, newExpAssay = mySummExp)

 

ADD COMMENT

Login before adding your answer.

Traffic: 763 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