Galaxy | Tool Preview

BAM filter (version 0.5.9)
in bp
in bp
both mapped, correct orientation, flag set in BAM
e.g. 0x400, 0x2
up to the Nth nucleotide starting from the 5prime end. -1 means do not filter, 0 means check along the entire read, 10 would make filter reads that are unique over the first 10 nucleotides.
Use only for low-coverage samples
Indels always counts as 1 regardless of length. Requires NM tag to be set.
Remove reads flagged with 0x100
Remove reads flagged with 0x200
Remove reads flagged with 0x400
Affects -excludebed and -includebed.
e.g. chrM, or _dup chromosomes
fraction of length

Removes reads from a BAM file based on criteria.

Given a BAM file, this tool will discard reads that did not meet the selected filtering criteria The output is another BAM file with the reads not matching the criteria removed.

Note: this does not adjust tag values reflecting any filtering. (for example:
if a read mapped to two locations (IH:i:2), and one was removed by filtering, the IH:i tag would still read IH:i:2).

Currently, the available filters are:

Agument Description
-minlen val Remove reads that are smaller than {val}
-maxlen val Remove reads that are larger than {val}
-mapped Keep only mapped reads
-unmapped Keep only unmapped reads
-properpair Keep only properly paired reads (both mapped, correct orientation, flag set in BAM)
-noproperpair Keep only not-properly paired reads
-mask bitmask Remove reads that match the mask (e.g. 0x400)
-uniq {length} Remove reads that are have the same sequence Note: BAM file should be sorted (up to an optional length)
-uniq_start Remove reads that start at the same position Note: BAM file should be sorted (Use only for low-coverage samples)
-mismatch num Number of mismatches or indels indel always counts as 1 regardless of length (requires NM tag in reads)
-nosecondary Remove reads that have the 0x100 flag set
-noqcfail Remove reads that have the 0x200 flag set
-nopcrdup Remove reads that have the 0x400 flag set
-excludebed file.bed {nostrand} Remove reads that are in any of the regions from the given BED file. If 'nostrand' is given, strand information from the BED file is ignored.
-includebed file.bed {nostrand} Remove reads that are NOT any of the regions from the given BED file. If 'nostrand' is given, strand information from the BED file is ignored. Note: If this is a large dataset, use "bamutils extract" instead.
-includeref refname Exclude reads NOT mapped to a reference
-excluderef refname Exclude reads mapped to a particular reference (e.g. chrM, or _dup chromosomes)