Filter out read records that are secondary alignments
This filter recognizes the SAM flag that identifies secondary alignments. It is intended to ensure that only records that are likely to be mapped in the right place, and therefore to be informative, will be used in analysis. To be clear, it does NOT filter out read records that are supplementary alignments.
java -jar GenomeAnalysisTk.jar \ -T ToolName \ -R reference.fasta \ -I input.bam \ -o output.file \ -rf NotPrimaryAlignment
GATK version 3.8-0-ge9d806836 built at 2017/07/29 01:40:22.