VirPipa is a modular Nextflow DSL2 pipeline for HCV probe-capture assembly and reporting. It reproduces the bash-original results/ contract while adding a maintainable workflow graph, fixture-backed module tests, VADR annotation, and geno2pheno resistance annotation.
The pipeline takes paired-end FASTQ input, removes host contamination, selects the best HCV reference, builds a hybrid assembly, polishes it with a pilon loop, creates final consensus and CRAM outputs, annotates with VADR, and reports subtype and resistance calls.
Main outputs per sample include:
- polished consensus FASTA and FAI
0.15-iupacconsensus FASTA- best-reference FASTA, CRAM, and report branch
- filtered
pilon-m*VCF set - CRAM / CRAI files
- subtype BLAST outputs
- VADR GFF and BED
- coverage, report, and nucleotide-frequency TSVs
- geno2pheno resistance TSV / BED / by-drug TSV
FASTQ
-> hostile host removal
-> subsample for best-reference selection
-> map to all HCV references
-> select best reference
-> SPAdes assembly
-> hybrid reference build
-> pilon polishing loop
-> pilon BAM -> majority-call replacement FASTA
-> pilon VCF -> filtered pilon-m* VCFs
-> 0.15-iupac consensus
-> no-opt remap to 0.15-iupac
-> final CRAM / report / BLAST branches
-> VADR annotation
-> geno2pheno resistance annotation
-> finalize bash-style results/
Push your current branch to the Hopper bare repo before starting a workflow there:
git push --set-upstream hopper refactor/modular-take3Run the standard Hopper wrapper from the cluster login node:
ssh rs-fe1 'cd /fs1/jonas/src/virpipa && bash -l runme.sh resume'For a test-module run on Hopper:
bash runme_test.sh resistanceUse the skrotis environment for local development:
source ~/miniforge3/etc/profile.d/conda.sh
conda activate skrotisRun a local module test:
nextflow run test_module.nf -profile local --module resistanceRun the full workflow locally with containers:
export SENTIEON_LICENSE=localhost:8990
NXF_OFFLINE=true nextflow run . \
-profile local_containers \
--input /tmp/virpipa_contract_local_samplesheet.csv \
--outdir /tmp/virpipa_contract_results_localSamplesheet columns:
clarity_sample_idor equivalent sample id columnread1read2- optional
sample_nameorlid - optional
run_nameorsequencing_run
Example:
clarity_sample_id,read1,read2,sample_name,run_name
SAMPLE001,/path/to/R1.fastq.gz,/path/to/R2.fastq.gz,TEST001,test_runSample outputs are published under:
results/<run_name>/<sample_id>/
The default --publish_mode routine writes the flat Virtitta-compatible sample archive. Use
--publish_mode debug to keep the same flat final files and additionally publish intermediate
subdirectories such as bam/, vcf/, fastq/, spades/, mummer/, and pilon/.
If enabled with --pipeline_info, Nextflow run metadata is written under:
results/<run_name>/pipeline_info/timeline.htmlresults/<run_name>/pipeline_info/report.htmlresults/<run_name>/pipeline_info/trace.txt
If --run_name is not provided, the built-in metadata path falls back to results/pipeline_info_<timestamp>/. DAG rendering is disabled by default; add --pipeline_info_dag to request dag.svg when Graphviz is available.
See docs/output.md for the current output contract and docs/pipeline_workflow.md for workflow details.
geno2pheno HCV rules are refreshed manually outside Hopper. The offline refresh entrypoint is:
python scripts/update_geno2pheno_rules.py --output-csv assets/hcv_geno2pheno_rules.csvThe pipeline currently consumes the committed CSV rules table by default via params.resistance_rules and the repo default is assets/hcv_geno2pheno_rules.csv.
