Question: subset of samples from dba object in DiffBind
gravatar for ashley.doane
2.9 years ago by
United States
ashley.doane20 wrote:


Is it possible to create a new dba object based on a subset of the samples in a previous call to dba.count, or dba.analyze?


Basically, I would like analyze subsets of samples as seperate analyses, without recounting.  I'm analyzing atac-seq data, which is paired end and >50 million reads per sample for 20-30 samples.  I've been using the summarize overlaps method to count (bSummarizeOverlaps=TRUE), which works great but takes a lot of time even on a server.     


A second and related question:  is there a way to pull out a summarizedExperiment from without limiting to  a specific contrast (or with all contrasts)?  I'm trying to get all of my samples into a summarizedExp object, using the counts and peaks data in the dba object.


Thanks for the great package!





ADD COMMENTlink modified 2.8 years ago • written 2.9 years ago by ashley.doane20
gravatar for Rory Stark
2.9 years ago by
Rory Stark2.5k
CRUK, Cambridge, UK
Rory Stark2.5k wrote:

Hi Ashley-

The dba() function will let you do both of these things.

Using the supplied tamoxifen resistance dataset as an example:

> data(tamoxifen_counts)
> tamoxifen

You can get a subset of these as a new DBA object:

> responsive <- dba(tamoxifen, mask=tamoxifen$masks$Responsive)
> responsive

You can also use dba() to get a SummarizedExperiment version of the DBA object:

> resp.sumEx <- dba(responsive,bSummarizedExperiment=TRUE)
> resp.sumEx

You could do both of these in one step as well:

> resp.sumEx <- dba(tamoxifen, mask=tamoxifen$masks$Responsive, bSummarizedExperiment=TRUE)



ADD COMMENTlink modified 2.9 years ago • written 2.9 years ago by Rory Stark2.5k
gravatar for ashley.doane
2.8 years ago by
United States
ashley.doane20 wrote:

Thanks Rory!

ADD COMMENTlink written 2.8 years ago by ashley.doane20
Please log in to add an answer.


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