cmuts hmm¶
Purpose¶
Computing reactivity rates from alignment files via the pair HMM.
Requires¶
One or more coordinate-sorted alignment files of single-end or merged reads. SAM, BAM, and CRAM formats are all supported
The FASTA library
Alignments must be single-end to avoid double-counting; a read carrying the paired flag causes the program to exit early. Please merge reads upstream before passing data to cmuts hmm.
Model Parameters¶
The pair HMM is configured by five internal parameters. --dump-params writes them in the form --params reads.
cmuts hmm --dump-params > params.txt
You may specify a subset of the parameters to modify only them.
Error Checking¶
cmuts hmm verifies the FASTA against the alignment header, by comparing each sequence’s name and length, and its MD5 checksum when present. Any mismatch between the header and the FASTA ends the run early. This behavior is configurable via the --verify flag.
Note
The length check is required to avoid buffer overflows and cannot be disabled.
Both the DNA and the RNA forms of the FASTA sequence are accepted during the checksum comparison.
Error Computation¶
cmuts hmm computes a per-base estimate for the reactivity error. This is purely the statistical error introduced by finite read depths; it does not account for experimental or systemic errors.
Rejected Reads¶
Reads which do not pass the configured filters are rejected, meaning they are not processed by the HMM and do not contribute to the final reactivity. A secondary alignment, a read with MAPQ 255, a read missing a sequence, or a read with no CIGAR is automatically rejected.
A read to which the HMM cannot assign a nonzero alignment probability is also rejected; this can only occur if you set one or more transition probabilities to zero.
Unmapped reads are rejected by nature of having no reference to compute mutation rates against.
Output¶
Dataset |
Source |
|---|---|
Estimated by the HMM. |
|
The binomial standard error of the rate at the position’s depth. |
|
Estimated by the HMM. |
|
The binomial standard error of the rate at the position’s depth. |
|
Estimated by the HMM. |
|
The binomial standard error of the rate at the position’s depth. |
|
Estimated by the HMM. |
|
The binomial standard error of the rate at the position’s depth. |
|
Estimated by the HMM. |
|
Tokenized from the FASTA. |
|
The read length reported in the alignment. |
|
The mapping quality reported in the alignment. |
|
The number of primary reads the HMM successfully processed. |
|
The number of primary reads rejected by a filter or by the HMM. |
|
The number of supplementary reads the HMM successfully processed. |
|
The number of supplementary reads rejected by a filter or by the HMM. |
|
The number of unmapped reads in the alignment. |
|
Estimated by the HMM. |
|
Estimated by the HMM. |
|
Estimated by the HMM. |
CLI Options¶
Arguments¶
Argument |
Description |
|---|---|
|
coordinate-sorted alignments |
Input and output¶
Option |
Description |
|---|---|
|
reference sequences (required) |
|
write results to this file (required) |
|
replace the output file if it already exists |
|
identity checks to make against the FASTA (name, checksum, none; default name,checksum) |
Filtering¶
Option |
Description |
|---|---|
|
reject alignments below this mapping quality (0 to 254; default 20) |
|
reject reads shorter than this (default: no limit) |
|
reject reads longer than this (default: no limit) |
|
reject alignments not on these strands (forward, reverse; default forward,reverse) |
|
reject alignments not of these types (primary, supplementary; default primary) |
Counting¶
Option |
Description |
|---|---|
|
reference positions the pair HMM may look either side of the CIGAR (default 2) |
|
assign the maximum sequencing error to bases below this quality (0 to 255; default 0) |
|
write these statistics of how often two positions are modified together (correlation, conditional, none; default none) |
|
write NaN rates and errors for positions below this depth (default 1) |
|
write NaN rates and errors for this many bases at the 5’ end (default 0) |
|
write NaN rates and errors for this many bases at the 3’ end (default 0) |
|
read the pair HMM’s rates from this file (default: built in) |
Performance¶
Option |
Description |
|---|---|
|
threads running the processing step (default 1) |
|
htslib threads for BGZF decompression (default 0) |
Information¶
Option |
Description |
|---|---|
|
show this help and exit |
|
show the version and exit |
|
write the rates in the form –params reads and exit |
Advanced¶
Accepted, and left out of --help.
Option |
Description |
|---|---|
|
reads in transit at once (default 4096) |
|
reads transferred per queue operation (default 64) |
|
references in flight (default 64) |
|
describe every argument as JSON and exit |
|
describe the output format as JSON and exit |