Average bigwig files (not sum)
1
0
Entering edit mode
2.4 years ago
srhic ▴ 40

Hello,

I have bigwig (RPKM) files of a chip-seq experiment for treatment and control conditions which I am trying to compare. I have 3 replicates for control and 5 replicates for treatment condition. To show the average difference in signal, I merged the replicates for each condition using ucsc bigWigMerge command.

However, if my understanding is correct this command simply adds the signal of all replicates and so the merged treatment file is no longer comparable to the merged control file. The treatment condition has more replicates and so shows higher values than control even when the actual signal shouldn't be different. Is my understanding correct? If yes, is there a way to merge bigwig files using average instead of sum of replicates and does this make sense? (preferably without merging bam files and recreating bigwigs)

Thanks

ChIP-Seq bigwig • 4.2k views
3
Entering edit mode
2.4 years ago
ATpoint 64k

Wiggletools has a mean command that can do it. It will accept BigWig files and output Wig files. Wig can then either be formatted into bigwig or into bedGraph. Note though that the bigwig files that e.g. WigToBigWig creates from these Wig files will be very large in size, in my experience 40-50% larger than if you first transform that Wig back to bedGraph and then to BigWig with bedGraphToBigWig. I never found out why that is but I always go Bigwigs => Wiggletools Mean => bedGraph => Bigwig to avoid these very large files.

0
Entering edit mode

Thanks. That looks perfect.

0
Entering edit mode

how did you merge your replicates bigwig format file? did you use bigWigMerge from UCSC tools? Now ,I also average my bigwig files.Thank you!

0
Entering edit mode

I averaged them with the tool described in my answer.