Toolkit for downstream processing of CiFi long reads.
pip install cifi
# or
mamba install bioconda::cifi| Command | Description |
|---|---|
cifi qc |
Sample reads and report enzyme site frequency, fragment sizes, estimated yield |
cifi digest |
In-silico digestion → paired-end FASTQ (all pairwise contacts) |
cifi filter |
MAPQ-based filtering of aligned paired-end BAM |
cifi enzymes |
List built-in restriction enzymes |
cifi qc reads.bam -e HindIII -o qc_out
cifi qc reads.bam -e NlaIII -n 50000 -o qc_out # sample 50k reads
cifi qc reads.bam -e HindIII -n 0 -o qc_out # all reads
cifi qc reads.bam --site GANTC --cut-pos 1 -o qc_out # custom siteWrites an output directory with HTML report, JSON, TSV tables, distribution plots (PNG), and a multi-page PDF.
cifi digest reads.bam -e HindIII -o output
cifi digest reads.fq.gz -e NlaIII -o output -m 5 --gzip
cifi digest reads.bam --site GANTC --cut-pos 1 -o outputProduces {prefix}_R1.fastq and {prefix}_R2.fastq (optionally gzipped), plus an HTML report and JSON stats.
cifi filter aligned.bam -o filtered.bam -q 30Keeps properly paired reads where both mates meet the MAPQ threshold.
Built-in enzymes:
| 4-cutters | 6-cutters |
|---|---|
| NlaIII (CATG) | HindIII (AAGCTT) |
| DpnII (GATC) | |
| MboI (GATC) | |
| Sau3AI (GATC) |
Any recognition site can be specified with --site and --cut-pos, including IUPAC degenerate bases (N, R, Y, W, S, M, K, B, D, H, V).
CiFi reads are concatemers of restriction fragments from genomic regions in 3D proximity. The toolkit finds all enzyme cut sites in each read, extracts fragments, and generates every pairwise combination as a pseudo paired-end read:
Read with 4 fragments: [A]-[B]-[C]-[D]
Pairs: A-B, A-C, A-D, B-C, B-D, C-D (6 pairs)
Abuelanin M, Kaya G, Lake JA, Lambert C, Wu MV, Berendzen K, Krasheninnikova K, Wood JMD, Solomon NG, Donaldson ZR, Bales KL, Howe K, Korlach J, Manoli DS, Tollkuhn J, Dennis MY. Single-library chromosome-scale diploid assemblies of vole genomes resolve a species-specific duplication implicated in pair bonding. bioRxiv 2026. doi: 10.64898/2026.03.13.711624