Open kmavrommatis opened 4 years ago
@kmavrommatis The way for MACS to decide fragment length is to read the TLEN
field of the BAM
file. Could you check by:
samtools view /chip_seq_qc/samtools_index/AB155_H3K27me3_mulmaprem.mdup_blkrem.bam | cut -f 9 | awk '$1>=0{print}' > tlen.txt
When MACS reads BAMPE file, it will ignore the rightmost end with a negative TLEN
because the location of the rightmost end can be inferred by adding the leftmost end with TLEN
. After that, calculate an average value from tlen.txt.
Hi, this question has been asked previously but I have not managed to find a satisfactory solution
I have a CHIPseq dataset sequenced with paired end reads. I aligned the reads with bowtie2 for Input and Treatment and got an average insert size of ~250 for all samples, according to picard collectinsertsize metrics. using plotFingerprint from deeptools indicates that the enrichment of these samples is sufficiently good. When using macs2 on this data using as input format BAMPE, it detects fragment size that is longer than 3kb and exits with error.
Note that using macs v2.2.7.1 predicts different fragment size length than macs v2.1.0 i.e. v2.2.7.1
while 2.1.0
The command line used was
For now, to avoid this error I have ended up specifying the format as BAM, i.e. ignoring the paired read.
How is the insert size calculated in BAMPE data and why is there such difference between macs2 and picard estimates? is there any suggestion how to bypass the problem by using the PE data, I could set slocal to a large value, or 0 but that would decrease the quality of the result, correct?
Thanks in advance for your help