Question: How to do differential peak analysis after scaling bam files?
gravatar for xiaoyonf
3 months ago by
xiaoyonf0 wrote:

Dear all,

I am trying to analyze my spiked-in ChIP-Seq data by scaling my original aligned BAM files. My workflow is as following,

  1. Use ChIPSeqSpike ( to get scaling fact for exogenous spiked-in drosophila chromatin across different samples.

  2. Use bamCoverage to get bigwig files by including the arguments: --scaleFactor 1.092883 -bs 10 --normalizeUsing RPGC --effectiveGenomeSize 2685511504 --extendReads 150

  3. For the input seq data, only use the RPGC scaling in bamCoverage to get bigwig files

  4. Convert individual bigwig files to wig using bigWigToWig (ucsc), then wig2bed (BEDOPS) to get bed files

I already used MACS2 to call peaks using the original BAM files and obtained the merged peaks across my samples in comparison. The purpose to obtain the scaled bigwig files is to perform the differential binding analysis across different samples, since I concerned the ChIP variance due to the altered ChIPed proteins across my samples in comparison.

But now I don't know how to further perform the differential peaks analysis. I know DiffBind requires original BAM files, which I don't know how to produce the scaled BAM files, other than the scaled bw/bedgraph/bed files I obtained above. I also had problems using the scaled bed files to build the TagDirectory in HOMER (failed in fragment length estimation), which can do such analysis using getDifferentialPeaks command.

I will really appreciate if someone can guide me to solve my problems. Thank you!

Xiaoyong Fu Baylor College of Medicine

chip-seq • 352 views
ADD COMMENTlink modified 3 months ago by Mo Heydarian830 • written 3 months ago by xiaoyonf0
gravatar for Mo Heydarian
3 months ago by
Mo Heydarian830
United States
Mo Heydarian830 wrote:


To compare your scaled bedgraph files, you could use multiGPS or SICER. Both of these tools are available on and accept bedgraph file as input to determine differential binding. You can subsequently filter out the differentially bound regions not corresponding to your peaks using BedTools or DeepTools.

Hope this helps!

Thanks for using Galaxy!



ADD COMMENTlink written 3 months ago by Mo Heydarian830

Hi Mo, thank you for the answer. However, when I run SICER in Galaxy using the bedgraph files I have the error: An error occured while running the tool CONVERTER_interval_to_bed_0. My bedgraph files were converted from bigwig, which was the output file from bamCoverage. I noticed that these bg files are 0-based and half-open. Is that the reason to have the error? Thanks again! Xiaoyong

ADD REPLYlink written 3 months ago by xiaoyonf0

I see your bug report. This error usually occurs when the interval input does not really meet strict BED format/content requirements (manual conversion) - or - the output is empty (when a tool runs the conversion as part of the primary job).

I am reviewing, more feedback soon.

Thanks! Jen, Galaxy team

ADD REPLYlink written 3 months ago by Jennifer Hillman Jackson25k

The conversation problem wasn't with SICER (those jobs are paused due to an input being in a failed state).

The input in a failed state is one of the bedgraph files you uploaded. The job error indicates that the file was too large to process (and it is the largest of your datasets), so that may be true, but it may be that the data didn't fully upload or hit a cluster node that had another larger job running (rare but happens).

Try using FTP to Upload and double check that the transfer is complete. (And make sure the data is not truncated locally, before Galaxy upload). Formatting could be an issue, but try a re-Upload first.

However, there is a known issue with SICER when used under certain conditions, so if you run into an error running that tool later, please review here: If that is your error, use alternative tools until this is fixed -- fails at both (recently) and (the last time it was tested).


ADD REPLYlink modified 3 months ago • written 3 months ago by Jennifer Hillman Jackson25k
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: 178 users visited in the last hour