dba.count generates less ranges than input peakset
1
0
Entering edit mode
@paurodriguezsodupe-15352
Last seen 3.5 years ago

Hi,

I've been analyzing ATAC-seq data with DiffBind. I have generated a dba object with the samples' bams and the peak bed files resulting from macs. I would like to take advantage of this dba object in order to get the normalized counts of my samples for a pre-defined peakset I have builded myself (custom_peakset). I don't know why when I retrieve the peakset, after computing the count using custom_peakset, it returns 94 ranges since my peakset is a GRanges Object with 288 ranges. I was wondering if the ranges without reads in non of my samples where omitted, but looking for couple of examples I have realized that those omitted ranges have coverage in my samples. What's wrong with my approach?

 

dba object (WT_KO_data)

5 Samples, 71116 sites in matrix (96868 total):

     ID Tissue Factor Condition Treatment Replicate Caller Intervals

1 CWS37  Mouse   CD34        WT       AUL         1    bed     61132

2 CWS38  Mouse   CD34        WT       AUL         2    bed     75585

3 CWS41  Mouse   CD34        WT       AUL         3    bed     56091

4 CSJ87  Mouse   CD34        KO       AUL         1    bed     65864

5 CSJ89  Mouse   CD34        KO       AUL         2    bed     65802

custom_peakset (GRanges_TSS_DE_genes)

GRanges object with 288 ranges and 1 metadata column:

        seqnames                 ranges strand |    name2

           <Rle>              <IRanges>  <Rle> | <factor>

    139     chr1 [186621791, 186623791]      * |    Tgfb2

    266     chr1 [ 50926522,  50928522]      * |   Tmeff2

    352     chr1 [ 73909230,  73911230]      * |     Tns1

    375     chr1 [ 83254443,  83256443]      * |   Sphkap

    409     chr1 [ 90765859,  90767859]      * |   Col6a3

    ...      ...                    ...    ... .      ...

  40470    chr19   [27215483, 27217483]      * |    Vldlr

  40523    chr19   [34239335, 34241335]      * |    Acta2

  40648    chr19   [44393449, 44395449]      * |     Scd1

  40723    chr19   [46598105, 46600105]      * |    Wbp1l

  40748    chr19   [47730755, 47732755]      * |     Sfr1

  -------

code:

WT_KO_TSS_counts <- dba.count(WT_KO_data, peaks=GRanges_TSS_DE_genes, score = DBA_SCORE_RPKM)

dba.peakset(WT_KO_TSS_counts,bRetrieve = TRUE)

GRanges object with 94 ranges and 5 metadata columns:
     seqnames                 ranges strand |              CWS37               CWS38              CWS41              CSJ87              CSJ89
        <Rle>              <IRanges>  <Rle> |          <numeric>           <numeric>          <numeric>          <numeric>          <numeric>
   1     chr1 [186621791, 186623791]      * |   1.28321078430491    1.58536316777965   1.75570845030605   13.3095282913037   3.57979720307908
   2     chr1 [190117034, 190119034]      * |  0.203874610590499   0.341754934371661  0.390157433401345   4.27806266506192   1.07112042296854
   3     chr1 [193220640, 193222640]      * |  0.371771348723852   0.360741319614531  0.471440232026626 0.0950680592235982   1.12749518207215
   4     chr1 [194937820, 194939820]      * |   5.01291689569581    4.62318480663886   7.70560930967657 0.0950680592235982   8.00521579271227
   5    chr10 [ 90997491,  90999491]      * |  0.563653335161969   0.958812454764937   0.69903206817741 0.0950680592235982   2.11405346638528
  ..      ...                    ...    ... .                ...                 ...                ...                ...                ...
  90     chrX [128489858, 128491858]      * |  0.179889362285735     0.1898638524287 0.0162565597250561 0.0950680592235982 0.0281873795518038
  91     chrY [ 46054983,  46056983]      * |  0.239852483047646   0.218343430293005 0.0162565597250561 0.0950680592235982 0.0281873795518038
  92     chrY [ 86200359,  86202359]      * | 0.0119926241523823 0.00949319262143502 0.0162565597250561 0.0950680592235982 0.0281873795518038
  93     chrY [ 86767848,  86769848]      * | 0.0119926241523823 0.00949319262143502 0.0162565597250561 0.0950680592235982 0.0281873795518038
  94     chrY [117265245, 117267245]      * | 0.0119926241523823 0.00949319262143502 0.0162565597250561 0.0950680592235982 0.0281873795518038

 

Thanks in advance,

 

Pau.

 

diffbind dba.count dba.peakset • 409 views
ADD COMMENT
0
Entering edit mode
Rory Stark ★ 4.1k
@rory-stark-5741
Last seen 18 days ago
CRUK, Cambridge, UK

Do any of the ranges in GRanges_TSS_DE_genes overlap? DiffBind will merge any overlapping ranges. You can check for these using eg. findOverlaps.

If you'd like, you can send me GRanges_TSS_DE_genes and I can check to see how DiffBind is handling it.

ADD COMMENT

Login before adding your answer.

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