ChipSeq: merge bam file before peak calling
2
0
Entering edit mode
5.3 years ago
Mike ★ 1.7k

Hi all,

I have chipseq data for 6 samples (treatment/control), with replicate (so total 12 bam files). Now I am looking for peak calling using MACS2, I have doubt on handling replicates in macs2, so anyone please clear my doubt on handling replicates,

should I merge replicate before peak calling or analyse separately??

Thanks in advance.

genome ChIP-Seq macs2 • 5.9k views
ADD COMMENT
5
Entering edit mode
5.3 years ago

I assume that your replicates are biological replicates. If they're technical then just merge the BAM files. Anyway, call peaks on each sample individually. You can then merge the peaks after filtering them and continue with whatever downstream processing is appropriate for your experiment.

ADD COMMENT
1
Entering edit mode

Hi Devon,

You can then merge the peaks after filtering them

This is what I usually do but it opens up another can of worms about filtering peaks and defining a consensus set of peaks. One can call peaks at high stringency then get the union of all peaks, or lower stringency then accept peaks found in n out m files etc. (In practice I go for the solution the gives a consensus set that gives sensible results after some visual inspection with IGV).

ADD REPLY
0
Entering edit mode

Thanks Devon,

my replicates are technical, so I should just merge the BAM files.

Is this command Ok?

samtools merge  WTCHG_112.bam WTCHG_223245_112.bam WTCHG_223246_112.bam
ADD REPLY
1
Entering edit mode

FWIW, you can provide multiple BAMs to macs2 and it'll merge them for you, avoiding the extra step and extra storage.

ADD REPLY
0
Entering edit mode

Thanks Ryan, also looks good idea.

But how to use multiple files in macs2 command:

macs2 callpeak -t ChIP.bam -c Control.bam -f BAM -g hs -n test -B -q 0.01
ADD REPLY
1
Entering edit mode

Provide them as space-separated values. From macs2 callpeak -h:

Input files arguments:
  -t TFILE [TFILE ...], --treatment TFILE [TFILE ...]
                        ChIP-seq treatment file. If multiple files are given
                        as '-t A B C', then they will all be read and pooled
                        together. REQUIRED.
  -c [CFILE [CFILE ...]], --control [CFILE [CFILE ...]]
                        Control file. If multiple files are given as '-c A B
                        C', they will be pooled to estimate ChIP-seq
                        background noise.
ADD REPLY
0
Entering edit mode

Yup, that should work :)

ADD REPLY
2
Entering edit mode
5.2 years ago
Constantine ▴ 280

You can use a peakcaller that accepts biological replicates

I personally use PePr and I'm really happy with it. It has really high sensitivity and works very well both for sharp and broad regions

ADD COMMENT
0
Entering edit mode

Thanks Constantine,

looks good, I will try..

ADD REPLY
0
Entering edit mode

Hi , I am using PePr , using following command but I got errors, could you please help me, what is wrong?

python PePr.py -c Chip_R1.bam -i Input_R1.bam –n R1_sample1 –f bam --peaktype=sharp

error:

Traceback (most recent call last):
  File "PePr.py", line 57, in <module>
    try: main(sys.argv)
  File "PePr.py", line 25, in main
    parameter, readData = optParser.process_opt(opt)
  File "optParser.py", line 84, in process_opt
    parameter = Parameters(opt)
  File "classDef.py", line 124, in __init__
    self.process_command_line_option(opt)
  File "classDef.py", line 142, in process_command_line_option
    self.file_format = opt.file_format.lower()
AttributeError: 'NoneType' object has no attribute 'lower'
ADD REPLY
1
Entering edit mode

Sorry for the late reply

you need to parse replicates. For example

python PePr.py -c Chip_R1.bam,ChIP_R2.bam -i Input_R1.bam,Input_R2.bam –n R1_sample1 –f bam --peaktype=sharp

ADD REPLY

Login before adding your answer.

Traffic: 2122 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6