Running the Pipeline¶
Minimal Run¶
This uses default settings: hg19 assembly, 4 threads, Kestrel genotyping engine.
Keep alignment inputs and outputs in separate trees
For BAM or CRAM input, the output root cannot be the directory containing the alignment or any of its descendants. A BAM at sample.bam with -o results/ is rejected because both resolve to the current directory root. Use separate trees such as inputs/sample.bam and results/sample/.
Common Options¶
vntyper pipeline --bam inputs/sample.bam -o results/sample/ \
--threads 8 \
--fast-mode \
--reference-assembly hg38
| Option | Effect |
|---|---|
--threads N | Number of threads to use (default: 4) |
--fast-mode | Skip filtering for unmapped and partially mapped reads (faster execution) |
--reference-assembly | Assembly used for alignment (default: hg19). See Reference Assemblies |
--sample-name | Label for results. Defaults to input filename stem |
--output-name | Base name for intermediate files. Fixed at output; any other value is rejected. Use --output-dir to separate runs |
With adVNTR Module¶
adVNTR provides independent Profile-HMM VNTR genotyping. Results are cross-matched with Kestrel calls. Use --advntr-max-coverage 300 for faster adVNTR processing on high-coverage sequencing runs.
With SHARK Module (FASTQ Only)¶
SHARK requires FASTQ input
SHARK read filtering only functions with paired-end FASTQ input. Supplying --extra-modules shark with --bam or --cram causes the pipeline to abort with an error.
Custom Regions¶
Override default MUC1 VNTR coordinates:
--custom-regions and --bed-file are mutually exclusive.
Archiving Results¶
vntyper pipeline --bam inputs/sample.bam -o results/sample/ \
--archive-results --archive-format tar.gz
Creates a compressed archive of the output directory after pipeline completion. Supported formats: zip (default) and tar.gz.
Additional Summary Formats¶
Each requested format writes two tabular files alongside pipeline_summary.json: pipeline_summary.csv / .tsv (one row per pipeline step, with run provenance in leading run_* columns), and pipeline_summary_rows.csv / .tsv (one row per step, result row, and field, capturing full multi-row adVNTR and cross-match results). Unsupported formats are ignored. See Output Files for column definitions.
Intermediate Files¶
| Option | Effect |
|---|---|
--keep-intermediates | Compatibility flag: intermediate files are kept by default, so this flag changes nothing. Use --delete-intermediates to remove them. |
--delete-intermediates | Delete intermediate files after processing (takes precedence when --keep-intermediates is also supplied). |
Custom Configuration¶
vntyper --config-path /path/to/custom/config.json pipeline \
--bam inputs/sample.bam -o results/sample/
--config-path is a global option and must appear before the subcommand. See Configuration for details.
Logging¶
Global log levels: DEBUG, INFO (default), WARNING, ERROR, CRITICAL. Global options must precede the subcommand. Pipeline logs write automatically to <output-dir>/pipeline.log. Override with -f /path/to/logfile.
Resuming Execution¶
When a pipeline run is interrupted or when re-running an analysis with new reporting options, pass --resume to reuse completed stage outputs:
Reusable Stages¶
Resumption evaluates checkpoint integrity from pipeline_summary.json and reuses completed outputs for: - Alignment and extraction: BAM/CRAM to FASTQ extraction or FASTQ alignment. - Kestrel genotyping: Reuses kestrel_result.tsv, output.vcf, output.bam, and kestrel_pre_result.tsv. - adVNTR genotyping: Reuses output_adVNTR_result.tsv.
Lightweight stages (BAM header parsing, coverage calculation, cross-match comparison, nomenclature determination, and HTML report rendering) always recompute to ensure up-to-date reporting.
Run Identity Invariants and Refusals¶
Resumption aborts with an error if run identity diverges from the prior summary checkpoint: - Pipeline version changes - Input file path changes - Sample name changes - Reference key or assembly changes - Decision profile checksum changes
If an output artifact from a reusable stage is missing or fails MD5 verification, that stage and all dependent downstream stages are recomputed.