Changes

From Genome Analysis Wiki
Jump to navigationJump to search
1,175 bytes added ,  15:51, 30 September 2010
no edit summary
Line 5: Line 5:  
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 <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.
 +
 +
Steps:
 +
# 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
 +
#* <pre></pre>
    
=== Parameters ===
 
=== Parameters ===

Navigation menu