131 | | ENCODE pipeline macs2 code: |
132 | | {{{ |
133 | | |
134 | | # Create virtual SE file containing both read pairs |
135 | | bedtools bamtobed -i filtered.bam | awk 'BEGIN{OFS="\t"}{$4="N";$5="1000";print $0}'| gzip -c > tagAlign.gz |
136 | | |
137 | | # Call peaks: ENCODE using very small p-value, so it could get enough peaks for IDR |
138 | | macs2 callpeak -t tagAlign.gz -n foo.narrow -f BED -g ${species} -p 0.01 --nomodel --shift -75 --extsize 150 --call-summits --keep-dup all -B --SPMR --call-summits |
139 | | |
140 | | }}} |
141 | | |
142 | | MACS2 Commands used in ATAC-seq review paper: |
| 131 | |
| 132 | MACS2 [[ https://github.com/alexyfyf/atac_nf/blob/7f996b7de0e349c5a10dbbd75b2c266339517a3b/atac.nf#L341 | commands used in ATAC-seq review paper ]]: [[https://genomebiology.biomedcentral.com/articles/10.1186/s13059-020-1929-3 | From reads to insight: a hitchhiker’s guide to ATAC-seq data analysis]] |
150 | | |
151 | | |
152 | | |
153 | | |
154 | | If using the 'BAMPE' option with paired-end reads, let MACS run the pileup and calculate 'extsize'; ask MACS to keep only 1 read if duplicates are present. |
155 | | {{{ |
156 | | |
157 | | macs2 callpeak -f BAMPE -t file.sorted.bam --keep-dup 1 -B -q 0.01 -g mm -n MACS_ATACSeq_Peaks |
158 | | |
| 140 | ENCODE pipeline macs2 code: |
| 141 | {{{ |
| 142 | |
| 143 | # Create virtual SE file containing both read pairs |
| 144 | bedtools bamtobed -i filtered.bam | awk 'BEGIN{OFS="\t"}{$4="N";$5="1000";print $0}'| gzip -c > tagAlign.gz |
| 145 | |
| 146 | # Call peaks: ENCODE uses very small p-value, so it could get enough peaks for IDR |
| 147 | macs2 callpeak -t tagAlign.gz -n foo.narrow -f BED -g ${species} -p 0.01 --nomodel --shift -75 --extsize 150 --call-summits --keep-dup all -B --SPMR --call-summits |
| 148 | |
| 149 | }}} |
| 150 | |
| 151 | |
| 152 | If using the 'BAMPE' option with paired-end reads, let MACS run the pileup and calculate 'extsize'; |