Question: Merging Bam Files
0
gravatar for hlsz.laszlo
6.0 years ago by
hlsz.laszlo20
Hungary
hlsz.laszlo20 wrote:

Dear all,

I having trouble with analyzing my ChIP-seq data. I have an IP, input with replica (ChIP1, Input1, ChIP2, Input2). I merged the alignement files (.bam hg19) with bamtools merge, then called peaks. The problem is merging summs the reads at a given position. Like:

Example

So, the final goal is, how to merge the samples as the read numbers averaged not summed at same positions?

Regards, Laszlo

merge bam • 2.0k views
ADD COMMENTlink modified 6.0 years ago by Sean Davis25k • written 6.0 years ago by hlsz.laszlo20
0
gravatar for Sean Davis
6.0 years ago by
Sean Davis25k
National Institutes of Health, Bethesda, MD
Sean Davis25k wrote:

If you really want the average, the I would do what you did in the table above and count each sample separately and do the averaging at the count level. However, I suspect that is not something that you want to do, as the magnitude of count data is quite important.

ADD COMMENTlink written 6.0 years ago by Sean Davis25k

Hi Davis,

I can count the read number for given regions with coverageBed for the samples, then create a coverage file that contains the average for the two, but from then you can't call peaks. I need to do this somehow manipulating sam/bam headers. Any suggestions?

L

ADD REPLYlink written 6.0 years ago by hlsz.laszlo20

If you want to call peaks, just merge the BAM files and call peaks. It is not possible to "average" two BAM files.

ADD REPLYlink written 6.0 years ago by Sean Davis25k

Thank you! Saved my time

ADD REPLYlink written 6.0 years ago by hlsz.laszlo20
Please log in to add an answer.

Help
Access

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