Changelog¶
Unreleased¶
4.0.0 - 2026-11-23¶
pip install hicstuff alone now runs the whole pipeline, from FASTQ files to
matrices, on Linux and macOS: with -a bwa, no other program is needed.
Breaking changes¶
- hicstuff needs Python 3.10 or later (#122).
- With 50,000 contigs or more in the map (those that
--sizeand--excludekeep), as a metagenome assembly may have,hicstuff pipelinewrites its contact map as a metacool file,abs_fragments_contacts_weighted.metacool, rather than a cool file, unless given--binningor--matrix cool, and warns of it. See--matrix metacoolbelow.
New¶
- bwa runs in-process through pybwa,
which is now a dependency of hicstuff (#125).
-a bwaruns thebwaprogram when it is on PATH, and pybwa otherwise.--aligner-backend {auto,binary,python}onpipeline,iteralignandmissview, orHICSTUFF_ALIGNER_BACKEND, chooses. - Mapping mode
5spm(-m 5spm) aligns the mates withbwa mem -5SPM: the 5'-most alignment of a read cut by a ligation junction is its primary one, as in the 4DN, Juicer and Arima pipelines (#125). It aligns with bwa only, through pybwa unless--aligner-backend binary, and is not the default. Its pairs record each mate at its aligned 5' end, the end of the sequenced molecule, as pairtools does; the other modes record the leftmost base of each mate's alignment (#129). - Pairs are sorted in Python when no usable
sortprogram is installed (none on PATH, or busybox's) (#124).HICSTUFF_SORT=pythonalways sorts them in Python. - The log of
hicstuff pipelinerecords the command that ran it, quoted to paste in a shell, on a## cmd:line after the date. hicstuff pipelinereads several pairs of FASTQ files, such as the lanes of a library, as one library: the R1 files, then the R2 files, comma-separated or as glob patterns, quoted or not (hicstuff pipeline ... lib1_*_R1.fq.gz lib1_*_R2.fq.gz). The R1 and R2 files of each pair must start with the same read. They are concatenated in the temporary directory, and give the outputs of the library in one pair of files.full_pipelinetakes lists of files forinput1andinput2.- The
--genomeofhicstuff pipelinecan be the prefix of a bwa index without its FASTA, as it could be of a bowtie2 index: hicstuff reads the sequence from the index's.pacand.ambfiles, with no program. hicstuff pipeline --matrix metacool(-M metacool) writes the contact map as a metacooler file, made bymetacooler create pairs: a cool file with one bin per fragment, which cooler reads, with metacooler's tables of genomes and contigs, its contigs not yet assigned to genomes. Unlike cooler, metacooler does not store the contig of each bin as an HDF5 enum, whose cost grows with the square of the number of contigs. metacooler, 0.4.0 or later, is now a dependency of hicstuff: the contact statistics it counts on the pairs (qc, which hicstuff leaves to metacooler's defaults) split the contacts within a contig at 1001 bp, so that those whose reads are more than 1 kb apart are long-range, as metaTOR'smgereads them from the map. It is the default map from 50,000 contigs (see Breaking changes), but with--binning, which it does not take:--binningand--balancing-args, options of the cool map, are refused with it, but for--binning 0and blank values.full_pipelinetakesmat_fmt="metacool", and its defaultmat_fmt=Nonechooses between cool and metacool as the command does.hicstuff pipeline --matrix none(-M none) writes no contact map: the run ends with its pairs file, for the tools that build their own maps from pairs (metaTOR, metacooler).--binning,--balancing-argsand--exclude, options of the cool map, are refused with it, but for--binning 0and blank values; so arebinning,balancing_argsandexcludewithmat_fmt="none"infull_pipeline.- With 50,000 contigs or more in a cool map (
--matrix cool, or with--binning),hicstuff pipelinewarns, before it aligns reads or builds an index, that the map will be slow to write: cooler takes a time that grows with the square of the number of contigs for every cooler it writes (about 30 s at 117,000 contigs). The warning names the formats that do not pay it.
Changed¶
--matfmtofhicstuff pipelineis now--matrix, still-M.--matfmtstill works, but the help no longer shows it.hicstuff pipeline --helplists its main options in a panel of their own, before the advanced ones, and describes each mapping mode.- FASTQ reads are counted, and the genome extracted from a bowtie2 index is compressed, in Python: gzip, zcat, pigz and wc are no longer needed (#123).
- Cutsite mode reads FASTQ files with pysam: pyfastx is no longer a dependency (#123).
- When the aligner is missing, the error also suggests
-a bwa, which needs no program (#125). - With
-a bwa, the log warns of a bwa-mem2 index of the genome, which bwa and pybwa cannot read, before building a bwa index. - An installation of hicstuff now contains GPLv3 code: every pybwa wheel compiles in bwa (#125). See Licence.
- The Docker image no longer ships samtools, which hicstuff has not needed since it runs the samtools that pysam bundles (#127).
- The package declares its licence as an SPDX expression (PEP 639) (#127).
- The documentation has moved from Read the Docs to
https://koszullab.github.io/hicstuff/, rewritten in Markdown and built
with Zensical: guides to the pipeline, the aligners, digestion, the 3C event
filter, the distance law and the commands on matrices, a reference of every
command and option, the file formats, and the Python API from the
docstrings. It recommends mapping mode
5spm, which its examples use. The Sphinx sources (doc/) and the demo notebooks are gone, the README is shorter, and thedocsextra (uv sync --extra docs) installs what builds the site instead of thedevextra's Sphinx.
Fixed¶
- Iterative mapping with
-a mm2,-a minimapor-a bt2aligned with bowtie2 in its final round (#125). - The pipeline indexes a FASTA without index where it is, plain or compressed, in a directory of its own in the temporary directory, which the cleanup removes. It copied the FASTA to the temporary directory first, compressed, also in runs that align no reads, and left there the index files it built.
- A
--genomethat is neither a FASTA file nor the prefix of an index the aligner reads stops the pipeline before it writes anything. The error was logged, and the run went on until a later step failed. full_pipelinerefuses amat_fmtother thangraal,bg2,cool,metacoolandnonebefore the run starts, logged as an error. Another name wrote an empty matrix file under its extension.
Outputs¶
Runs with the same programs installed write the same pairs, matrices and logs
as hicstuff 3.3.0, but for the ## cmd: line of the pipeline's log, and
for a map of 50,000 contigs or more: a metacool file by default, and a warning
with a cool file. Without the bwa program, -a bwa aligns through pybwa,
and the log says so. Its alignments then equal the bwa program's, except for
reads with several alignments of equal score beyond the first 10,000 reads of
a file, which pybwa can place on another of them. In our tests this moved
0.17% of the alignments, none with a mapping quality of 30 or more.