Repository navigation
pmdshodh 0.2.3
pmdshodh 0.2.3 is a small fix release. Scores are unchanged from 0.2.2.
Fixed
filterno longer adds a second CG tag to a read with more than 65,535 CIGAR operations when that read comes from BAM input (BAM stores such CIGARs in a CG tag). Before, the kept record grew by 4 bytes per operation, and samtools showed CG as an ordinary tag. Kept records are now written unchanged. This mostly affects long reads; SAM input and--tagwere not affected.
Also in this release
- Checks on real aligner output: reads aligned with bwa aln (eager's settings), bwa mem and bowtie2, then sorted, merged, marked for duplicates or converted to CRAM 3.0 and 3.1 with samtools. On 17 of the 18 files,
--pmdtools-compatmatches PMDtools 0.60 read by read (largest difference 4.2e-14, up to 199,865 reads per file) and keeps the same reads. Output is identical at 1 and 4 threads. - Clearer note when MD tags disagree with
-r. On bwa output this happens at referenceNbases, such as rCRS position 3107: bwa replaces them with a random base, so its MD tags give a base the reference doesn't have, and-ris right not to score that site. - Documented limitation:
--pmdtools-compatdoes not reproduce PMDtools on=read bases (samtools calmd -eoutput) for reverse-strand reads or for reads made only of=. Default mode with-rhandles=correctly.
Install
pip install pmdshodh==0.2.3Or download the binary for your platform below and check it against SHA256SUMS. A Bioconda package is still to come.
Changes
Added
- Checks on the output of real aligners (WSL Ubuntu 24.04; bwa 0.7.19, bowtie2 2.5.5, samtools 1.25, PMDtools 0.60). 100,000 reads of ENA ERR3991018 (single-stranded, no UDG) were aligned to the rCRS (
MTof human_g1k_v37), single-end and as fully overlapping pairs.- The inputs were:
bwa aln(eager's-l 1024 -n 0.01),bwa mem(supplementary alignments with hard clips) andbowtie2(end-to-end,--local,-k 5);- then
samtoolssort, merge, markdup (single-end and paired), name-sort,calmd -e, and CRAM 3.0 and 3.1; - and 14 crafted reads: a 66,000 bp read with 66,000 CIGAR operations, 1,500 and 5,000 bp reads, IUPAC codes in reads and reference, an N run, a soft-masked region,
X/=and padding CIGARs, clips next to indels, a secondary read without SEQ, and a 1 bp read.
- For each input,
scoreandfiltergave the same output at-@ 1and-@ 4, with no NaN scores, and every output passedsamtools quickcheck. --pmdtools-compatagainst PMDtools, on the reads PMDtools scores: 0 reads above 1e-6 and identical kept reads on 17 of the 18 aligner outputs, all butcalmd -e(up to 199,865 reads each, largest difference 4.2e-14), and on the 7 crafted reads PMDtools can read. PMDtools crashed on the reads over 1,000 bp, a known PMDtools bug (docs/design.md §5).- The
calmd -eoutput differs in compat mode; this is documented instead of reproduced (docs/design.md §5). -ragainst MD: identical scores for bowtie2. For bwa output, about 1% of reads differ (968 of 99,935 single-end), all covering MT:3107. There the rCRS hasN, which bwa replaces with a random base when indexing, so its MD tags give that base;-rdoes not score the site.
- The inputs were:
Changed
- The stderr note on MD tags that disagree with
-rnames both usual causes: MD written before realignment, or against referenceNbases that the aligner replaced, as bwa does. It used to say "usually stale after realignment".
Fixed
filter: a read with more than 65,535 CIGAR operations, which BAM stores in a CG tag, gained a second CG tag when read from BAM and written as BAM or SAM (264,008 bytes more for 66,000 operations), so samtools showed CG as an ordinary tag. Kept records are now written unchanged. SAM input and--tagwere not affected.
What's Changed
- Keep one CG tag on long-CIGAR records; record the aligner sweep by @dpatel511 in #39
- Prepare 0.2.3 by @dpatel511 in #40
Full Changelog: v0.2.2...v0.2.3