Question: Summarized Experiments - Combine
0
5.5 years ago by
Italy
Jose M Garcia Manteiga310 wrote:
Dear Martin and BioC, I am using the Summarized Experiments object in DESeq2 to upload RNA- Seq data. I have resequenced a subset of samples in my experiment and re-counted them with htseq-count, therefore I end up with a subset of new files with new count data. I wondered whether there is a in-R way of using the SummarizedExperiments data object to sum up the counts of the second Run to the counts of the first run. Of course I know how to do without the DESeqDataSet and other DESeq functions but I thought that maybe there is a quick and safer way by using some combine onto 2 different dds (SE) objects of same rowData with samples to sum. Thanks in advance Best Jose
deseq deseq2 • 2.2k views
modified 5.5 years ago by Valerie Obenchain6.7k • written 5.5 years ago by Jose M Garcia Manteiga310
0
5.5 years ago by
United States
Valerie Obenchain6.7k wrote:
Hi Jose, If the SummarizedExperiment objects have the same rowData you can use cbind() to combine the data into a single SE object. This combines the data in info() and assays() so the counts of each SE object end up in the assays()$counts matrix as separate columns. cmb <- cbind(SE1, SE2) In this way you can create one SE object that holds all counts for the different experiments. To sum the counts use rowSums() on the count matrix. rowSums(assays(cmb)$counts) Valerie On 10/07/2013 05:43 AM, Garcia Manteiga Jose Manuel wrote: > Dear Martin and BioC, > I am using the Summarized Experiments object in DESeq2 to upload RNA-Seq data. I have resequenced a subset of samples in my experiment and re-counted them with htseq-count, therefore I end up with a subset of new files with new count data. I wondered whether there is a in-R way of using the SummarizedExperiments data object to sum up the counts of the second Run to the counts of the first run. Of course I know how to do without the DESeqDataSet and other DESeq functions but I thought that maybe there is a quick and safer way by using some combine onto 2 different dds (SE) objects of same rowData with samples to sum. > Thanks in advance > Best > Jose > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >
Thanks Valerie, I have used both techniques. First I have created an SE object with cbind that was the 'union' of both. Then I have changed the colums(samples) by using a rowSums command like yours on the SE.sum counts I noticed that there is a collapse procedure in the Vignette of parathyroidSE for technical replicates that could be more or less the same. Thank you all, Jose On Oct 7, 2013, at 5:55 PM, Valerie Obenchain <vobencha at="" fhcrc.org=""> wrote: > Hi Jose, > > If the SummarizedExperiment objects have the same rowData you can use > cbind() to combine the data into a single SE object. This combines the > data in info() and assays() so the counts of each SE object end up in > the assays()$counts matrix as separate columns. > > cmb <- cbind(SE1, SE2) > > In this way you can create one SE object that holds all counts for the > different experiments. To sum the counts use rowSums() on the count matrix. > > rowSums(assays(cmb)$counts) > > > Valerie > > On 10/07/2013 05:43 AM, Garcia Manteiga Jose Manuel wrote: >> Dear Martin and BioC, >> I am using the Summarized Experiments object in DESeq2 to upload RNA-Seq data. I have resequenced a subset of samples in my experiment and re-counted them with htseq-count, therefore I end up with a subset of new files with new count data. I wondered whether there is a in-R way of using the SummarizedExperiments data object to sum up the counts of the second Run to the counts of the first run. Of course I know how to do without the DESeqDataSet and other DESeq functions but I thought that maybe there is a quick and safer way by using some combine onto 2 different dds (SE) objects of same rowData with samples to sum. >> Thanks in advance >> Best >> Jose >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at r-project.org >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >> >