From 7bbcfa86394b120e6ba21efec7fcf6b9779c72bd Mon Sep 17 00:00:00 2001 From: Tao Liu Date: Mon, 7 Oct 2024 16:14:21 -0400 Subject: [PATCH] describe the filtering criteria in SAM/BAM/BAMPE parser --- docs/source/docs/SAMBAMBAMPE.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/source/docs/SAMBAMBAMPE.md b/docs/source/docs/SAMBAMBAMPE.md index 98baf831..752026e1 100644 --- a/docs/source/docs/SAMBAMBAMPE.md +++ b/docs/source/docs/SAMBAMBAMPE.md @@ -24,3 +24,19 @@ The only exception is that the `callvar` command in MACS3 will need to read the actual sequences and mapping information such as the mismatch, insertion, deletion, etc from BAM. Also, please make sure that the BAM file for `callvar` has to be sorted and indexed. + +## Filtering Criteria + +MACS3 will apply the following rule to throw away bad alignments while +scanning the 'flag' field in SAM/BAM/BAMPE. A record will be +discarded: + +1. If a record is an unmapped read, not a primary alignment, or for a + read that fails QC, or a supplementary alignment +2. If this is for paired reads: + 1. this read is not paired + 2. the mate of this read (the other read in the pair) is not + mapped + 3. this read is the second read in the pair (NOTE: the first read + in the pair is already enough for MACS to get enough + information)