pmdshodh 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pmdshodh-0.1.0/CHANGELOG.md +56 -0
- pmdshodh-0.1.0/Cargo.lock +766 -0
- pmdshodh-0.1.0/Cargo.toml +23 -0
- pmdshodh-0.1.0/LICENSE +21 -0
- pmdshodh-0.1.0/PKG-INFO +259 -0
- pmdshodh-0.1.0/README.md +236 -0
- pmdshodh-0.1.0/pyproject.toml +33 -0
- pmdshodh-0.1.0/src/bgzf.rs +350 -0
- pmdshodh-0.1.0/src/damage.rs +146 -0
- pmdshodh-0.1.0/src/lib.rs +8 -0
- pmdshodh-0.1.0/src/main.rs +986 -0
- pmdshodh-0.1.0/src/model.rs +248 -0
- pmdshodh-0.1.0/src/reads.rs +197 -0
- pmdshodh-0.1.0/src/sites.rs +675 -0
- pmdshodh-0.1.0/src/summary.rs +253 -0
- pmdshodh-0.1.0/tests/cli.rs +930 -0
- pmdshodh-0.1.0/tests/data/pmdtools_site_terms.tsv +5417 -0
- pmdshodh-0.1.0/tests/data/reads_random.sam +1502 -0
- pmdshodh-0.1.0/tests/data/reads_random_pmdtools.tsv +1504 -0
- pmdshodh-0.1.0/tests/data/reads_random_pmdtools_deamination.tsv +94 -0
- pmdshodh-0.1.0/tests/data/reads_random_pmdtools_ds3.tsv +486 -0
- pmdshodh-0.1.0/tests/model_parity.rs +55 -0
- pmdshodh-0.1.0/tests/oracle/gen_deamination.py +31 -0
- pmdshodh-0.1.0/tests/oracle/gen_read_fixture.py +175 -0
- pmdshodh-0.1.0/tests/oracle/gen_site_terms.py +93 -0
- pmdshodh-0.1.0/tests/oracle/gen_writesamfield.py +33 -0
- pmdshodh-0.1.0/tests/oracle/pmd_reference.py +81 -0
- pmdshodh-0.1.0/tests/read_parity.rs +142 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to pmdshodh are recorded here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow [Semantic Versioning](https://semver.org/).
|
|
4
|
+
|
|
5
|
+
Changes to the JSON run summary are listed with its `format_version`.
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.1.0] - 2026-11-14
|
|
10
|
+
|
|
11
|
+
First release.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- `filter` command: keep reads by PMD score and write SAM or BAM, with an `@PG` header line and an optional score tag.
|
|
15
|
+
- `score` command: per-read PMD scores as TSV.
|
|
16
|
+
- `damage` command: JSON run summary only.
|
|
17
|
+
- PMD score following the likelihood model of Skoglund et al. (2014), with PMDtools-compatible options for double-stranded and single-stranded libraries and CpG/UDG-treated data.
|
|
18
|
+
- `--pmdtools-compat` to reproduce PMDtools 0.60 exactly, including its known bugs, for comparisons.
|
|
19
|
+
- Multi-threaded scoring and BGZF compression; output is identical for any thread count.
|
|
20
|
+
- JSON run summary (`format_version` 1) with read counts, skipped reads by reason, a score histogram and damage tables.
|
|
21
|
+
- Parity tests against PMDtools on synthetic and real reads.
|
|
22
|
+
- Prebuilt binaries on GitHub Releases for Linux x86_64 and aarch64 (glibc 2.17 or newer), macOS arm64 and x86_64, and Windows x86_64, with SHA-256 checksums. Scores agree across these platforms to within 2e-15: Linux and macOS give byte-identical output on the test fixture, and Windows differs in the last digits.
|
|
23
|
+
- Minimum supported Rust version 1.91 (the minimum of noodles 0.119), declared in `Cargo.toml` and tested in CI. The README used to say 1.85, which was never true.
|
|
24
|
+
- README, design notes, benchmark plan and roadmap.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
- `--ss` scores each C site once, following the paper's single-stranded model (SI Eq. S1). PMDtools 0.60 adds the double-stranded term as well, which roughly doubles ss scores and makes them depend on which end the damage is at. Default ss scores are therefore lower than PMDtools'; `--pmdtools-compat` keeps PMDtools' scores.
|
|
28
|
+
- `filter --upper-threshold` no longer keeps reads with no informative sites; they carry no evidence of being undamaged. They are still counted as `no_informative_sites`. `--pmdtools-compat` keeps them, as PMDtools does.
|
|
29
|
+
- Faster scoring, with byte-identical output: double-stranded site terms are precomputed once per run, damage counting no longer copies each read, and BAM records are read directly instead of through the generic record interface. On the first 2,000,000 reads of ENA ERR1892229 (i5-13500H laptop, WSL, medians of 7 interleaved runs), `score -@ 1` went from 11.05 s to 8.19 s, `filter -@ 1` from 10.71 s to 7.29 s and `filter -@ 8` from 3.00 s to 2.18 s.
|
|
30
|
+
- With `-@` above 1, reading, scoring and output now overlap (a reader thread and a scoring thread run alongside output), so multi-threaded runs scale further; `-@ 1` is unchanged. Output is byte-identical; peak memory rises from 12–22 MB to 21–33 MB (at most three batches of 10,000 records in flight). On the first 2,000,000 reads of ENA ERR1892229 (i5-13500H laptop, WSL, medians of 5 interleaved runs, monotonic clock), `score -@ 8` went from 3.08 s to 1.75 s and `filter -t 3 -@ 8` from 2.03 s to 1.45 s.
|
|
31
|
+
- `-@ N` now means at most N threads doing work at once, so pipelines can pass their CPU allocation.
|
|
32
|
+
- Before, scoring, BGZF decompression and BGZF compression each had their own pool of N threads, and `-@ 8` used about 9 cores.
|
|
33
|
+
- They now share one pool. The new `src/bgzf.rs` compresses exactly as noodles-bgzf did, so output bytes are unchanged.
|
|
34
|
+
- At the same `-@`, runs are slower than before because they use fewer cores. For the same number of cores they are as fast or faster.
|
|
35
|
+
- Measured on the first 2,000,000 reads of ENA ERR1892229 (i5-13500H laptop, WSL, medians of 5 interleaved runs, monotonic clock):
|
|
36
|
+
- `score -@ 8`: 1.71 s on 6.3 cores (before: 1.65 s on 7.9);
|
|
37
|
+
- `filter -t 3 -@ 8`: 1.45 s on 7.1 cores (before: 1.38 s on 9.4);
|
|
38
|
+
- `filter -t 3 -@ 12`: 1.25 s on 9.6 cores (before: 1.33 s on 10.2);
|
|
39
|
+
- `filter -t 3 -@ 1`: 7.58 s → 8.43 s (it used to take 1.2 cores).
|
|
40
|
+
- Peak memory at `-@ 8` is 33–38 MB, because up to four batches are in memory.
|
|
41
|
+
- Errors for MD tags that disagree with the alignment now suggest recomputing MD with `samtools calmd`. Such tags are usually stale after realignment.
|
|
42
|
+
- `score` and `filter` count damage tables only when `--summary` is given; the `damage` command always counts them. Output is byte-identical. On the first 2,000,000 reads of BER11_L_NOuser (i5-13500H laptop, WSL, medians of 5 interleaved runs, monotonic clock):
|
|
43
|
+
- `score -@ 1`: 8.77 s → 6.18 s (metaDMG `pmd -@ 1`: 8.23 s; before the shared thread pool: 8.68 s);
|
|
44
|
+
- `filter -t 3 -@ 1`: 8.77 s → 6.17 s (before the shared thread pool: 7.95 s);
|
|
45
|
+
- `score -@ 8`: 1.60 s → 1.26 s; `filter -t 3 -@ 8`: 1.42 s → 1.04 s;
|
|
46
|
+
- with `--summary`, unchanged (1.43 s for `filter -t 3 -@ 8`).
|
|
47
|
+
- Each command's `--help` groups its options under headings (Output, Filtering, Summary, Scoring model, Read filters, Performance) and ends with examples. A test runs every example. Usage lines say `pmdshodh` on every platform.
|
|
48
|
+
- `--range 0` is rejected as invalid input (exit 2) before any input is read; it used to give empty damage tables.
|
|
49
|
+
|
|
50
|
+
### Fixed
|
|
51
|
+
- `--pmdtools-compat` with several threads no longer slows down 2–5× from contention on glibc's allocator lock. The shared thread pool above made this worse, and the fix sizes compat's per-read buffers up front instead of growing them. On BER11_L_NOuser (14.0 M reads, 5 alternating runs), `filter --pmdtools-compat -@ 8` took 10.8–11.8 s instead of 23.9–66.6 s. Scores are unchanged.
|
|
52
|
+
- `score -o -` writes to stdout; it used to create a file named `-`.
|
|
53
|
+
- `--pmdtools-compat` now also reproduces PMDtools 0.60 for lowercase reference bases in MD (never counted as C or G) and for reverse-strand reads whose MD contains characters PMDtools drops when reverse-complementing (e.g. lowercase `n`). Default scoring is unchanged; both are listed as departures in docs/design.md.
|
|
54
|
+
|
|
55
|
+
[Unreleased]: https://github.com/dpatel511/pmdshodh/compare/v0.1.0...HEAD
|
|
56
|
+
[0.1.0]: https://github.com/dpatel511/pmdshodh/releases/tag/v0.1.0
|