Skip to content

migec 2.0.0a2 — positional layouts, presets, and a measured downstream contract

Pre-release
Pre-release

Choose a tag to compare

@mikessh mikessh released this 13 Aug 12:38
· 92 commits to master since this release

Install: pip install --pre migec

Positional is the primary mode

Most libraries fix the barcode at an offset in one read. Saying so no longer takes a sample sheet
or a flag:

migec checkout reads.fq.gz --bc-pattern '^NNNNNNNN' -o out/      # a caret anchors it
migec checkout reads.fq.gz --bc-pattern '0:8'       -o out/      # or a half-open slice
migec checkout R1.fq.gz R2.fq.gz --bc-pattern 'cell:0:16,16:26' -o out/
migec checkout R1.fq.gz R2.fq.gz --preset 10x-v2 -o out/

Slices are half-open and 0-based like Python's, each a UMI slice unless prefixed cell:; gaps
between them become skipped bases, which is what a spacer is.

--max-offset is now automatic and should not be passed. A caret, a slice list, a read
structure and a pattern with nothing to score all anchor at the first base. This was the sharpest
edge in the interface: 10x and TSO500 needed --max-offset 0 typed by hand, and without it every
read was refused — correct, but only after the run had failed.

Presets

umi, migec, primerid, duplex, 10x, 10x-v2, tso500, smarter-umi.
migec sheet --presets prints each with its source. Every one is a published chemistry with a
citable source and a test that compiles it.

Two carry warnings that are part of the preset:

  • duplex emits single-strand consensuses. Duplex pairing is not implemented; do not quote a
    duplex error rate from it.
  • TSO500's UMI is 5 nt, on R1 only (5M5S+T +T). 1,024 barcodes does not identify a molecule
    on a real ctDNA panel, and TSO500's own pipeline does not claim it does — it groups on the UMI
    and the mapping position, after alignment. migec groups on the barcode and will report the
    space as saturated; on this chemistry that warning is the correct answer.

The downstream contract is measured, not asserted

New docs/downstream.rst, run against real assemble output:

tool what arrives result
minimap2 -ax sr -y name + tags 600/600 records carry RX, CB, MI; valid sorted BAM
bwa mem -C name + tags 600/600
arda amplicon name only AIRR sequence_id is the molecule id
salmon / kallisto sequence only counts are molecule counts

Never run alevin, bustools or STARsolo on a consensus FASTQ — they deduplicate from a raw
barcode read that no longer exists. STAR is unverified here: the Homebrew arm64 build reports zero
input reads for any FASTQ, so the failure is the build's.

Also

  • A run that matches nothing says so, and says nothing else. Zero assigned reads used to print
    three warnings computed from reads that never arrived. Found by the smarter-umi preset, whose
    first draft scored a three-base anchor — 6.0 bits against an anchored bar of 6.64, so it refused
    every read and reported that as a library property.
  • SRP150352 cannot be reprocessed from SRA: its pipeline moves the UMI into the FASTQ header
    and SRA rewrites headers. Confirmed on three runs; migec suggest reports it unprompted.
  • Translating from zUMIs (so, from NASC-seq2): ranges there are 1-based and inclusive, slices
    here are 0-based and half-open, so UMI(12-19) is 11:19.
  • README badges, docs/layouts.rst, and a Nextflow module that takes migec_preset.

Full notes in CHANGELOG.md.