178 | | # convert bam to bed |
179 | | bedtools bamtobed -i foo.bam > foo_pe.bed |
180 | | # shift reads |
181 | | cat foo.pe.bed | awk -F $'\t' 'BEGIN {OFS = FS}{ if ($6 == "+") {$2 = $2 + 4} else if ($6 == "-") {$3 = $3 - 5} print $0}' >| foo_tn5_pe.bed |
182 | | # call peaks. |
183 | | # --keep-dup all: since duplicates have been removed in previous step |
184 | | macs2 callpeak -t foo_tn5_pe.bed -n foo -f BED -g mm -q 0.01 --nomodel --shift -75 --extsize 150 --call-summits --keep-dup all |
| 178 | # convert bam to bed |
| 179 | bedtools bamtobed -i foo.bam > foo_pe.bed |
| 180 | # shift reads |
| 181 | cat foo.pe.bed | awk -F $'\t' 'BEGIN {OFS = FS}{ if ($6 == "+") {$2 = $2 + 4} else if ($6 == "-") {$3 = $3 - 5} print $0}' >| foo_tn5_pe.bed |
| 182 | # call peaks. |
| 183 | # --keep-dup all: since duplicates have been removed in previous step |
| 184 | macs2 callpeak -t foo_tn5_pe.bed -n foo -f BED -g mm -q 0.01 --nomodel --shift -75 --extsize 150 --call-summits --keep-dup all |