Question: diffbind and macs2 output
gravatar for tony
4.0 years ago by
tony10 wrote:

I would like to know how to format the macs2 peaks to be used in diffbind package. I have the following files:


I can not use the xls as I am getting an error:

Error in Summary.factor(c(926L, 1085L, 1022L, 998L, 902L, 1360L, 677L,  :
  ‘max’ not meaningful for factors

The contents of xls file are:

chr     start   end     length  pileup  -log10(pvalue)  fold_enrichment -log10(qvalue)  name

Thanks in advance.




diffbind macs2 • 2.8k views
ADD COMMENTlink modified 4.0 years ago by Gord Brown590 • written 4.0 years ago by tony10
Answer: diffbind and macs2 output
gravatar for Gord Brown
4.0 years ago by
Gord Brown590
United Kingdom
Gord Brown590 wrote:


When you use the "--broad" option, the .xls output format is slightly different from the usual MACS format (missing the "summit" column).  DiffBind doesn't account for that, unfortunately (though I'll put it on the to-do list).

The "broadPeak" and "gappedPeak" formats are almost "bed" format; just use the first 6 columns only, and rename them to have a ".bed" suffix.  This command will extract the first 6 columns:

> cut -f 1-6 something.broadPeak > something.bed

Hope this helps...

 - Gord

ADD COMMENTlink written 4.0 years ago by Gord Brown590

(And change your sample sheet to show that the files are 'bed', not 'macs' format)

ADD REPLYlink written 4.0 years ago by Gord Brown590


17 months later does Diffbind handles .xls format from MACS2 --broad option ? or do we still have to use your trick ?

Just to know , thanks !

Edit : Seems to work using macs in Peaks Column

ADD REPLYlink modified 2.5 years ago • written 2.5 years ago by ZheFrench10


if i want to analysis broadpeak ,can i use this file ---macs.xls? and select 'macs' format in the samplesheet now? 


ADD REPLYlink written 12 months ago by 16926792470
Please log in to add an answer.


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