Question: How to do differential peak analysis after scaling BAM files
gravatar for xiaoyonf
12 months ago by
Baylor College of Medicine, Houston, Texas, USA
xiaoyonf10 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,

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

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

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

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 • 718 views
ADD COMMENTlink written 12 months ago by xiaoyonf10

Homer takes alignment files to create tag directory. you can normalize the depth of your BAM files using PICARD downsample and then build tag directory on that and do further downstream analysis.

ADD REPLYlink modified 12 months ago • written 12 months ago by Prakash1.4k

Hi Prakash, thanks for your reply. But I am not sure I understand the downsample procedure. How do I apply the different scaling factors for each samples in the downsample algorithm? Thanks for your further explanation. -Xiaoyong

ADD REPLYlink written 12 months ago by xiaoyonf10

The scaling factor can be determined based on the sample having lowest depth or your input control whichever is lower.

> Input.bam = 35464501 
> factor_x.bam = 53156118 
> scaling factor =  35464501/53156118 = 0.667
ADD REPLYlink modified 12 months ago • written 12 months ago by Prakash1.4k

Thanks, Prakash. I think I can use the way you suggested.

ADD REPLYlink written 11 months ago by xiaoyonf10
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.3.0
Traffic: 764 users visited in the last hour