I'm filtering my sam file using the following command:
samtools view -Sb -f 2 -F 256
after doing some research I think I've figured out what the flags mean (correct me if I'm wrong).
-f 2 is keeping only reads that are "properly aligned according to the aligner"
-F 256 is discarding "secondary alignments"
1. I'm not really sure what "properly aligned" entails but is it maybe too stringent? Typically I've seen people use only -F 4 to discard unmapped reads.
2. If I'm correct a secondary alignment is a second tier alignment in which the read that matches with a lesser score than some other read. If so, is discarding this reasonable or again too stringent?
I'm new to this so I'd really value some input on how to select these two flags. I've seen a wide variety/combinations of them used. My reads are paired end ones from WGS studies in yeast and E. coli and I'm using them to call SNPs/indels using freebayes.