Repository navigation
pmdshodh 0.3.0
pmdshodh 0.3.0 adds an HTML damage report. Scores, filtering and the JSON run summary format are unchanged from 0.2.4.
Highlights
- New
reportsubcommand.pmdshodh report run.json [more.json ...] -o report.htmlturns the JSON run summaries written bydamage -o,filter --summaryorscore --summaryinto one HTML page. It never re-reads the alignments. Per sample, the page shows:- the run settings;
- read counts, skipped reads by reason, flag counts and, with
-r, MD tag agreement; - damage by position in percent: 5′ C→T, and 3′ G→A for double-stranded or 3′ C→T for single-stranded libraries, with all other substitutions as a dashed baseline;
- the first-base C→T rate with its standard error;
- the PMD score histogram with the thresholds marked and, for
filter, the fraction of scored reads kept; - read lengths of scored reads and, for
filter, of kept reads in a chart of their own.
- Several samples in one report. An "All samples" section overlays the samples' damage curves and score histograms.
- Self-contained and reproducible. The page uses inline SVG, with no JavaScript, external files or network access, so it opens offline or as an e-mail attachment. The same summaries give a byte-identical page.
- Checkable. The JSON stays the source of truth: the report computes rates from its counts, and every plotted value is also in a
data-valuesattribute. - Older summaries work. Summaries from 0.1.x (
format_version1) are accepted, with the fields they lack shown as "not recorded". An invalid summary exits with status 2 and names the file and field.
Validation
The report was checked on:
- the nf-core/eager test BAMs: JK2782 (mammoth mtDNA) and JK2067 (human 1240k capture);
- a real single-stranded library: UKY001, MT.
A script recomputed every plotted number from the JSON counts: 117 checks, 0 failures. On the single-stranded library, the 3′ C→T curve shows the damage (19.5% at the last base) where 3′ G→A shows none (0.6%). Details are in docs/report-proposal.md §9.
Install
pip install pmdshodh==0.3.0Or download the binary for your platform below and check it against SHA256SUMS. A Bioconda package is still to come.
Changes
Added
pmdshodh report run.json [more.json ...] -o report.html: an HTML damage report from one or more JSON run summaries (format_version1 or 2), without re-reading alignments.- Per sample: run settings, read counts, damage by position in percent (5′ C→T; 3′ G→A for ds, C→T for ss) against all other substitutions, the first-base C→T rate, the score histogram with thresholds and the kept fraction, and read lengths.
- Several summaries add overlay plots.
- One self-contained file with inline SVG and no JavaScript, byte-identical for the same summaries.
- Invalid summaries exit with status 2, naming the file and field.
- Outputs follow the same rules as the other subcommands: written by rename, removed on a signal, never written over an input.
- The JSON summary format is unchanged.
What's Changed
- Add HTML damage report (pmdshodh report) by @dpatel511 in #44
- Record the eager validation of the HTML report by @dpatel511 in #45
- Cap report figures at the chart width (B1) by @dpatel511 in #46
- Give kept read lengths their own chart (O1) by @dpatel511 in #47
- Prepare 0.3.0 by @dpatel511 in #48
Full Changelog: v0.2.4...v0.3.0