Skip to Content
CLI Usagechr3d sn-hic

chr3d sn-hic

chr3d sn-hic [OPTIONS]

Run the single-nucleus Hi-C pipeline over multiple cells from a manifest file.

Examples

Basic Example

chr3d sn-hic \ --manifest cells.tsv \ --genome /data/genomes/hg38.fa \ --chrom-sizes /data/genomes/hg38.chrom.sizes \ --output-dir ./results/sn_hic \ --threads 24

Advanced Example

chr3d sn-hic \ --manifest cells.tsv \ --genome /data/genomes/hg38.fa \ --chrom-sizes /data/genomes/hg38.chrom.sizes \ --output-dir ./results/sn_hic \ --threads 24 \ --min-contacts 5000 \ --resolutions 1000,5000,10000,25000,50000,100000 \ --keep-intermediates \ --verbose

Pipeline Steps

Per-cell (run for EACH cell in the manifest):

  1. Alignment — BWA MEM → SAM
  2. SAM/BAM — samtools sort/index → sorted BAM + flagstat
  3. Pairs — pairtools parse/sort/dedup/filter → .pairs.gz
  4. Matrix — cooler cload/zoomify → per-cell .cool

After all cells: 5. Cell QC — Filter cells by min-contacts threshold 6. Pseudobulk — cooler merge passing cells → pseudobulk .cool + .mcool

Manifest Format

Tab-separated file (no header):

cell_id R1.fastq.gz R2.fastq.gz

Output Layout

<output-dir>/ ├── cells/ │ ├── <cell_id>/ │ │ ├── aligned/ sorted BAM │ │ ├── pairs/ .pairs.gz │ │ └── matrices/ per-cell .cool │ └── ... ├── pseudobulk/ pseudobulk.cool + pseudobulk.mcool └── qc/ cell_qc_summary.txt + passing_cells.txt

Arguments

Required Arguments

ArgumentDescription
--manifest TSVTab-separated manifest: cell_id R1.fastq.gz R2.fastq.gz
--genome PATHBWA-indexed genome FASTA
--chrom-sizes PATHChromosome sizes file
--output-dir DIROutput directory

Processing Arguments

Same as bulk-hic:

  • --threads N (default: 4)
  • --splits N (default: 0)
  • --assembly NAME (default: hg38)
  • --min-mapq INT (default: 30)
  • --min-distance BP (default: 1000)
  • --resolutions CSV (default: 1000,5000,10000)

Cell QC Arguments

ArgumentDefaultDescription
--min-contacts INT1000Minimum valid contacts to keep a cell

Other Arguments

ArgumentDescription
--keep-intermediatesKeep intermediate files
--start-from STEPResume from step (1-6)
-v, --verboseEnable DEBUG-level logging
--log-file FILEWrite log to FILE
Last updated on