Repository navigation
seqcounter 1.0.0
seqcounter becomes an installable, tested package. Everything the first version did, it still does, with the same flags and the same refseqcounts.tsv; what changed is around that.
conda create -n seqcounter -c conda-forge -c bioconda bbmap python">=3.10"
conda activate seqcounter
pip install seqcounter
seqcounter -ref refs.fasta -i samples/ -o results/python seqcounter.py still works from a clone, with the same arguments, so existing scripts keep working.
Packaging and interface
- A
seqcountercommand andpython -m seqcounter, installable from PyPI (and bioconda shortly). - No Python dependency at all: pandas and psutil are gone. Only BBTools and Java are needed, as before.
- The counts table is printed to standard output, with the messages on standard error, so
seqcounter ... > counts.tsvworks. - Two new reports beside
refseqcounts.tsv:refseqcounts_samples.tsv(reads, bases, matched reads and the error per sample) andrefseqcounts.json(parameters, software versions, references and counts). - New options:
-s/--sample,--memory,--verbose, and-j/--jobsas another name for-p/--parallel.-vstill prints the version.
Counts that can be trusted
- A single fastq file is never read as interleaved: Seal guesses interleaving from the read names, and where it guessed wrong the counts were halved.
- The reference file is checked before anything runs: a sequence shorter than
-k(which Seal cannot find at all, and which used to be reported as a zero count), an empty sequence, two sequences whose first word is the same (their counts were added together), a file that is not fasta. - Sample name collisions are reported instead of being resolved silently: two files reducing to the same name used to be mixed into one entry and passed to Seal as a bogus pair.
- File names Seal cannot be given safely (spaces, quotes,
$,;,&, parentheses, commas, orxmx/xms) are linked under a neutral name; such a name could previously make the run fail, or run a command. - Formats are recognized from the content, not only the extension, and the quality encoding is forced (
qin=33). - Seal's memory is bounded: the Java heap is sized from the reference sequences and capped at 85% of the machine divided by the parallel jobs. Before, each job reserved most of the free memory, so
-p 2could put the machine into swap. - One sample failing no longer stops the run: its column is left empty, its error is reported, and the exit code is 1.
- The column order is deterministic, where it used to depend on which sample finished first.
Development
- 105 tests, 100% coverage, end to end on synthetic references, genomes and reads with known counts.
- GitHub Actions: tests on Python 3.10, 3.12 and 3.14 with ruff and Codecov, PyPI publishing on release, and the wiki published from
wiki/. - A wiki, a bioconda recipe, a
CITATION.cff, andexamples/run_example.sh, which generates its own data and counts it.
Full details in the changelog.