Expand description
pmdshodh: per-read post-mortem damage (PMD) scoring and filtering of ancient DNA alignments.
pmdshodh is a command-line tool; install it with cargo install pmdshodh and see the
README. Its stable interfaces are the command
line, its outputs and the JSON run summary (format_version). This library holds the
command’s internals; its API may change in any release, including patch releases.
Modules§
- bam_
header - BAM header reading without a second reference sequence dictionary (#110).
- bgzf
- BGZF reading and writing with (de)compression on the global rayon pool.
- cram
- CRAM input decoded container by container on the thread pool (docs/design.md §11).
- damage
- Damage tables: read bases (A, C, G, T) at reference C and G, by distance from each end of the
molecule. Reverse-strand reads are reverse-complemented first (molecule orientation), as in
PMDtools
--deamination(docs/blackbox.md). Index 0 is the terminal base. - mode_
check - Mode check: compare the damage pattern with the chosen
--libraryand--treatment(roadmap milestone 16, issue #96). A disagreement gives a note on stderr andmode_checkin the JSON run summary. The mode is never changed and the library type is never inferred, so scores and kept reads do not depend on this check. - model
- Per-site PMD score terms, matching PMDtools 0.60.
- reads
- Classify one alignment record: skip it (with a reason), reject it (invalid data) or score it.
- reference
- Reference FASTA access for
-r(docs/design.md §11). - report
- HTML damage report from JSON run summaries (docs/report-proposal.md, agreed 2026-11-20). Pure: parsed summaries in, one self-contained HTML string out (inline SVG, no JavaScript). The same summaries always give the same bytes.
- sites
- Turn one alignment into informative sites and sum their score terms.
- summary
- Run summary written as JSON for MultiQC (docs/design.md section 6).
FORMAT_VERSION5 is frozen (#102; README, “Compatibility of the JSON run summary”): a new field keeps it and is added to the field list intests/cli.rs; removing, renaming or retyping a field, or a new value for a field with a fixed set of names, needs a new version. No timestamps: identical runs give identical files.