NAME
coverm filter - Threshold alignments with insufficient identity (version 0.7.0)
DESCRIPTION
Only primary, non-supplementary alignments are considered, and output files are grouped by reference, but not sorted by position.
FLAGS
- --inverse
Only keep reads which are unmapped or align below thresholds. Note that output records may still be marked as mapped if they do not meet the thresholds. When used with --proper-pairs, only proper pairs which fail alignment thresholds are output i.e. it does not "invert" the proper pairs flag. [default: not set]
- -v, --verbose
Print extra debugging information. [default: not set]
- -q, --quiet
Unless there is an error, do not print log messages. [default: not set]
- -h, --help
Output a short usage message. [default: not set]
- --full-help
Output a full help message and display in 'man'. [default: not set]
- --full-help-roff
Output a full help message in raw ROFF format for conversion to other formats. [default: not set]
OPTIONS
- -b, --bam-files PATH ..
Path to reference-sorted BAM file(s). [required]
- -o, --output-bam-files PATH ..
Path to corresponding output file(s). [required]
- -t, --threads INT
Number of threads for output compression. [default:
1
]
ALIGNMENT THRESHOLDING
- --min-read-aligned-length INT
Exclude reads with smaller numbers of aligned bases. [default:
0
]
- --min-read-percent-identity FLOAT
Exclude reads by overall percent identity e.g. 95 for 95%. [default:
0
]
- --min-read-aligned-percent FLOAT
Exclude reads by percent aligned bases e.g. 95 means 95% of the read's bases must be aligned. [default:
0
]
- --min-read-aligned-length-pair INT
Exclude pairs with smaller numbers of aligned bases. Implies --proper-pairs-only. [default:
0
]
- --min-read-percent-identity-pair FLOAT
Exclude pairs by overall percent identity e.g. 95 for 95%. Implies --proper-pairs-only. [default:
0
]
- --min-read-aligned-percent-pair FLOAT
Exclude reads by percent aligned bases e.g. 95 means 95% of the read's bases must be aligned. Implies --proper-pairs-only. [default:
0
]
- --proper-pairs-only
Require reads to be mapped as proper pairs. [default: not set]
- --exclude-supplementary
Exclude supplementary alignments. [default: not set]
- --include-secondary
Include secondary alignments. [default: not set]
FREQUENTLY ASKED QUESTIONS (FAQ)
Can the temporary directory used be changed? CoverM makes use of the system temporary directory (often /tmp
) to store intermediate files. This can cause problems if the amount of storage available there is small or used by many programs. To fix, set the TMPDIR
environment variable e.g. to set it to use the current directory: TMPDIR=. coverm genome <etc>
For thresholding arguments e.g. \-\-dereplication\-ani and \-\-min\-read\-percent\-identity, should a percentage (e.g 97%) or fraction (e.g. 0.97) be specified? Either is fine, CoverM determines which is being used by virtue of being less than or greater than 1.
EXIT STATUS
- 0
Successful program execution.
- 1
Unsuccessful program execution.
- 101
The program panicked.
EXAMPLES
- Filter a BAM file by removing alignments shorter than 50bp
$ coverm filter --bam-files input.bam --output-bam filtered.bam --min-read-aligned-length 50
- Filter inverse: Keep alignments that have <95% alignment identity and those which do map at all. Note that the output BAM file will likely records that are still mapped, but align with < 95% identity. Use 16 threads for output compression
$ coverm filter -b input.bam -o inverse_filtered.bam --inverse --min-read-percent-identity 95 --threads 16