Skip to content

pmdshodh 0.3.0

Choose a tag to compare

@github-actions github-actions released this 20 Nov 21:20
· 61 commits to main since this release
e136268

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 report subcommand. pmdshodh report run.json [more.json ...] -o report.html turns the JSON run summaries written by damage -o, filter --summary or score --summary into 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-values attribute.
  • Older summaries work. Summaries from 0.1.x (format_version 1) 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.0

Or 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_version 1 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

Full Changelog: v0.2.4...v0.3.0