From Genome Analysis Wiki
1,175 bytes added
14:51, 30 September 2010
no edit summary
The <code>filter</code> option on the [[Bam|bam executable]] writes the alignments filtering them by clipping ends with too high of a mismatch percentage and by marking reads unmapped if the quality of mismatches is too high.
The following modifications may occur in an alignment:
* CIGAR updated to reflect clips
* POS updated to reflect a new CIGAR if clipping occurs at the front of a read
* FLAG updated to reflect a read is unmapped if it is below the quality of mismatches is too high, or clipping would cause an entire read to be clipped.
=== NOTES ===
The POS and FLAG fields of an alignment are reflected in the mate's alignment. Thus, when the mate also needs to be updated.
Also, if the file was sorted, and a POS was changed, the file may no longer be sorted.
'''NOTE: This program does NOT update the mate or resort the file.'''
In order to update the mate, samtools fixmate must be run.
In order to reorder the file, samtools sort must be run.
Notes about the samtools programs:
* samtools fixmate requires the file to be sorted by query name.
* samtools sort cannot write to pipes.
# Run this program and pipe it into samtools sort by query name
#* <pre>./bam filter --in <your InputFile> --refFile <your reference file> --out -.bam <any other options> | samtools sort -n - temp.bam</pre>
# Run samtools fixmate and pipe it into samtools sort by position
=== Parameters ===
← Older edit
Newer edit →
Retrieved from "
About Genome Analysis Wiki