License |
|
Nextflow |
|
DOI |
|
CI |
|
This repository hosts a Nextflow workflow to compress the output produced by nf-core/hic v2+.
- Nextflow (at least version: v25.04. Pipeline was developed using v25.04.6)
- Docker or Apptainer/Singularity
The workflow requires two inputs:
- The output folder produced by nf-core/hic
- The reference genome used for mapping by nf-core/hic
You can download an example dataset to test the pipeline from doi.org/10.5281/zenodo.16083810:
# Make sure you have curl and zstd available in your PATH
user@dev:/tmp/$ curl -L 'https://zenodo.org/records/16083811/files/nfcore-hic-v2.1.0-results.tar.zst?download=1' | zstdcat | tar -xf -
user@dev:/tmp/$ curl -L 'https://zenodo.org/records/16083811/files/W303_SGD_2015_JRIU00000000.fsa.zst?download=1' | zstdcat > reference.fa
# Note that decompressing the reference genome is optional.
# The pipeline can transparently handle most compression formats.
user@dev:/tmp/$ ls -lah
total 12M
drwxr-xr-x. 3 user user 80 Jul 18 11:18 .
drwxrwxrwt. 110 root root 3.0K Jul 18 11:17 ..
drwxr-xr-x. 11 user user 220 Jul 17 16:42 results
-rw-r--r--. 1 user user 12M Jul 18 11:18 reference.fa
The workflow can be run as follows:
nextflow run --nfcore_hic_outdir='nfcore_hic_results/' \
--fasta='reference.fa' \
-output-dir 'results/' \
https://github.com/robomics/compress-nfcore-hic-output \
-r v1.0.0 \
-with-apptainer # Replace this with -with-docker to use Docker instead
This will produce the following outputs:
results/alignment
: Folder containing thebwt2pairs
files in CRAM format (one per sample). With default settings, the reference genome is embedded in the.cram
files.results/stats
: Folder containing one.tar.xz
file for eachstats
folder produced by nf-core/hic.results/validpairs
: Folder containing the.allValidPairs
files compressed usingxz
.results/*.tar.xz
: One TAR archive for each folder (besidescontact_maps
andhicpro
) found undernfcore_hic_outdir
(e.g., archivemultiqc.tar.xz
contains the report generated by MultiQC.
Troubleshooting
Permission errors when running pipeline with -with-docker
:
Try to pass option -process.containerOptions="--user root"
to nextflow run
Cannot find revision vx.x.x
:
Try to remove folder ~/.nextflow/assets/robomics/compress-nfcore-hic-output
before running the workflow
Error 403 when pulling containers from ghcr.io:
In order to pull docker images from ghcr.io
, you first need to log in to ghcr.io/robomics
.
- Follow GitHub instructions to generate a personal access token (PAT): docs
- Run
docker login
orapptainer remote
to login into the remote.
Example:
# Using Docker
docker login -u your-github-username ghcr.io/robomics
# Using apptainer
apptainer remote login -u your-github-username docker://ghcr.io/robomics
# You will now be prompted to enter your PAT
If you are having trouble running the workflow feel free to reach out by starting a new discussion here.
Bug reports and feature requests can be submitted by opening an issue.