Galaxy | Tool Preview

Filter SAM or BAM (version 1.1.1)
Requires headers in the input SAM or BAM, otherwise no alignments will be output.
Requires headers in the input SAM or BAM, otherwise no alignments will be output.
region should be presented in one of the following formats: `chr1', `chr2:1,000' and `chr3:1000-2,000'

What it does

This tool uses the samtools view command in SAMTools toolkit to filter a SAM or BAM file on the MAPQ (mapping quality), FLAG bits, Read Group, Library, or region.

Input

Input is either a SAM or BAM file.

Output

The output file will be of the same format a the Input file, filtered by the selected options.

Options

Filtering by read group or library requires headers in the input SAM or BAM file.

If regions are specified, only alignments overlapping the specified regions will be output. An alignment may be given multiple times if it is overlapping several regions. A region can be presented, for example, in the following format:

chr2  (the whole chr2)
chr2:1000000   (region starting from 1,000,000bp)
chr2:1,000,000-2,000,000      (region between 1,000,000 and 2,000,000bp including the end points).

Note: The coordinate is 1-based.

Multiple regions may be specified, separated by a space character:

chr2:1000000-2000000 chr2:1,000,000-2,000,000 chrX