Search
Question: Can i add an experiment to an existing MultiAssayExperiment?
0
gravatar for mario.zanfardino
6 months ago by
Naples (Italy)
mario.zanfardino120 wrote:

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? 
 

 

ADD COMMENTlink modified 6 months ago • written 6 months ago by mario.zanfardino120
2
gravatar for Marcel Ramos
6 months ago by
Marcel Ramos ♦♦ 290
United States
Marcel Ramos ♦♦ 290 wrote:

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 COMMENTlink written 6 months ago by Marcel Ramos ♦♦ 290
1
gravatar for mario.zanfardino
6 months ago by
Naples (Italy)
mario.zanfardino120 wrote:

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 COMMENTlink modified 6 months ago • written 6 months ago by mario.zanfardino120
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 314 users visited in the last hour