Parameters¶
Applies to GraffiTE v1.1
Verified against v1.1.0.0 at commit bf51777. The
2024 paper describes v1.0, which
differs in places; see v1.0 vs v1.1.
Every default on this page was read from nextflow.config or from the code that consumes it. The
Source column gives the file and line so you can check.
How to pass parameters¶
Nextflow distinguishes two kinds of option by the number of leading dashes:
| Form | Belongs to | Example |
|---|---|---|
--name value |
GraffiTE, anything on this page | --assemblies assemblies.csv |
-name value |
Nextflow itself | -resume, -profile cluster, -with-report |
nextflow run cgroza/GraffiTE -r v1.1.0.0 -latest \
-profile cluster \
--reference hs37d5.fa \
--assemblies assemblies.csv \
--TE_library human_DFAM3.6.fasta \
--genotype_with reads.csv
Defaults live in nextflow.config.
Override them on the command line, in a local copy of the config passed with -c, or in a
-params-file.
Use underscores, not hyphens
--genotype-with x.csv sets a parameter named genotypeWith and leaves genotype_with at
its default, reads.csv; --genotype_with x.csv sets genotype_with. The pipeline ignores
the hyphenated form without a message and reads the default samplesheet instead, or stops
because reads.csv is missing from the launch directory. Older versions of the README showed
the hyphenated form. Verified with Nextflow 26.04.6.
Required inputs¶
Almost every run needs three parameters, and all three default to a filename rather than to
false. If you do not set them, GraffiTE looks for reference.fa and TE_library.fa in the
launch directory and stops if they are absent.
| Parameter | Default | Effect | Source |
|---|---|---|---|
--reference |
"reference.fa" |
Reference genome FASTA. Everything is called relative to it. Its existence is checked at launch. Plain or BGZF-compressed; Stage 2 re-compresses a plain gzip with bgzip. | nextflow.config:50, module/main.nf:580-587 |
--TE_library |
"TE_library.fa" |
FASTA of repeat consensus sequences, passed to RepeatMasker as -lib. Needed for Stage 2, and again by the HERV-K step under --human, even with --RM_dir. |
nextflow.config:52, main.nf:144,175 |
--genotype_with |
"reads.csv" |
Samplesheet of the read sets to genotype. Read when --genotype is true (the default). See Samplesheets. |
nextflow.config:43, main.nf:189 |
Stage 1: SV search inputs¶
Supply at least one of these unless you enter further downstream with --vcf, --RM_dir or
--graffite_vcf. They add up: pass several and all of their calls go into one truvari merge.
| Parameter | Default | Effect | Source |
|---|---|---|---|
--assemblies |
false |
Samplesheet of genome assemblies. Each is aligned with minimap2 (or winnowmap) and called with svim-asm haploid, keeping INS and DEL of 100 bp or more. |
nextflow.config:45, module/main.nf:187 |
--longreads |
false |
Samplesheet of unaligned long reads. Aligned, then called per sample and jointly with Sniffles2 at --minsvlen 100. |
nextflow.config:44, module/main.nf:113,131 |
--bams |
false |
Samplesheet of long-read BAMs that are already aligned to --reference. Skips alignment and goes straight to Sniffles2. Combines with --longreads. |
nextflow.config:32, main.nf:92-101 |
--pav |
false |
Samplesheet of phased assemblies to call with PAV, which runs in its own container. Keeps variants with |SVLEN| above 50 bp. | nextflow.config:46, module/main.nf:170 |
--svs |
false |
Samplesheet of per-sample SV VCFs you called yourself. No caller runs; the files go straight into the merge. | nextflow.config:47, main.nf:120-123 |
--vcf is the one input that does not combine. Passing it beside any of the five above stops the
run at launch with a message naming the flags. main.nf:46-49
See Stage 1: SV search for what each backend does.
Discovery tuning¶
| Parameter | Default | Effect | Source |
|---|---|---|---|
--aligner |
"minimap2" |
Aligner for assemblies and long reads. The only other accepted value is "winnowmap". Any other value leaves map_asm and map_longreads with no script and the run fails. |
nextflow.config:124, module/main.nf:51-64 |
--asm_divergence |
"asm5" |
minimap2 -x preset for assembly alignment. Use asm10 or asm20 for assemblies further from the reference. Assemblies only. |
nextflow.config:123, module/main.nf:53 |
--break_scaffolds |
false |
Split each assembly into contigs at runs of at least --break_scaffolds_min_gap N before aligning. For scaffolded input. |
nextflow.config:48, main.nf:107-109 |
--break_scaffolds_min_gap |
10 |
Shortest run of N that --break_scaffolds treats as a gap. A shorter run is an unknown base and stays inside its contig, so an insertion that carries one is not cut. 1 splits at every N. |
nextflow.config:49, module/main.nf:39, bin/breakgaps.py:14-15 |
--mini_K |
"500M" |
minimap2 and winnowmap -K, the number of bases loaded per batch. Larger is faster and uses more memory. |
nextflow.config:57, module/main.nf:53 |
--stSort_m |
"4G" |
samtools sort -m, memory per sort thread. Total sort memory is about stSort_m times stSort_t, on top of the aligner. |
nextflow.config:58, module/main.nf:54 |
--stSort_t |
4 |
samtools sort -@, sort threads. Independent of the process cpus. |
nextflow.config:59, module/main.nf:54 |
Stage 2: TE annotation¶
| Parameter | Default | Effect | Source |
|---|---|---|---|
--repeat_span_cutoff |
0.80 (fraction of variant length) |
The filter keeps a variant when total_repeat_span, the fraction of its sequence covered by the union of RepeatMasker hits and ULTRA tandem repeats, is above this value. Applied twice: per contig chunk, and again after concatenation. |
nextflow.config:61, module/main.nf:579,661 |
--tsd_win |
30 (bp) |
Width of the flank on each side of the variant, and of the variant end trimmed for the search, when looking for target site duplications. Sizes the sequences and the scoring alike. | nextflow.config:54, module/main.nf:675,690 |
--tsd_batch_size |
100 (variants) |
Variants per TSD-search task. Lower for more parallel tasks, higher for fewer. | nextflow.config:60, main.nf:158 |
Trusted subset¶
Without --human, GraffiTE writes pangenome.trusted.vcf, a conservative subset of
pangenome.vcf. These parameters define it. With --human, GraffiTE writes neither
pangenome.trusted.vcf nor GraffiTE.merged.genotypes.trusted.vcf.gz, because --human replaces
the trusted subset instead of narrowing it. genotyping_audit still reads all three on every
genotyping run to fill the trusted column of genotyping_record_audit.tsv.
| Parameter | Default | Effect | Source |
|---|---|---|---|
--trusted_min_svlen |
250 (bp) |
Minimum |SVLEN|. Sized for insertions; it truncates the SVA_*(VNTR_only) records, whose unit is about 49 bp. See SVA VNTR polymorphisms. |
nextflow.config:62, module/main.nf:17 |
--trusted_max_ultra_span |
0.6 (fraction of variant length) |
Maximum ULTRA_TR_span; rejects variants that are mostly tandem repeat. Records whose class is Simple_repeat bypass it. |
nextflow.config:63, module/main.nf:17 |
--trusted_ignore_filter |
false |
When true, the record no longer needs FILTER=PASS from the upstream caller. |
nextflow.config:64, module/main.nf:25 |
The full expression also requires n_hits==1. It has no polyA requirement; the --human subset
has one. See Stage 2: TE annotation.
--human MEI subset¶
--human swaps the trusted subset for one restricted to recent human mobile element subfamilies.
The output is pangenome.human.vcf; pangenome.trusted.vcf is not written. It also turns on the
HERV-K steps below.
| Parameter | Default | Effect | Source |
|---|---|---|---|
--human |
false |
Write pangenome.human.vcf instead of pangenome.trusted.vcf, run hervk_annotate, and run hervk_reconcile after genotyping. |
nextflow.config:65, main.nf:171,286 |
--human_alu_ids |
"^AluY" |
Alu subfamilies to keep. The default keeps every AluY* and drops AluS* and AluJ*. |
nextflow.config:70 |
--human_l1_ids |
"^L1HS" |
L1 subfamilies. Add ^L1PA2 to widen by one subfamily. |
nextflow.config:71 |
--human_sva_ids |
"^SVA_[DEF]" |
SVA subfamilies. The same list gates the Simple_repeat records that come from VNTR-only SVA variants, where it matches the consensus the VNTR sequence scored against rather than the host element's subfamily. See SVA VNTR polymorphisms. |
nextflow.config:72, module/main.nf:542-543 |
--human_hervk_ids |
'^HERVK-int,^HERVK$,^LTR5_Hs,^LTR5A,^LTR5B' |
HML-2 lineage names. Both HERVK-int and a bare HERVK are listed because libraries differ; ^HERVK$ is anchored at both ends so that HERVK9, HERVK11 and HERVK14 stay out. Single-quoted in the config because $ inside double quotes is a Groovy interpolation. |
nextflow.config:73-81 |
--human_min_svlen |
250 (bp) |
Minimum |SVLEN|. Sized for insertions; it truncates the SVA_*(VNTR_only) records, whose unit is about 49 bp. See SVA VNTR polymorphisms. |
nextflow.config:82, module/main.nf:545 |
--human_max_ultra_span |
0.6 (fraction of variant length) |
Maximum ULTRA_TR_span; Simple_repeat records bypass it. |
nextflow.config:83, module/main.nf:545 |
--human_ignore_filter |
false |
When true, drop the FILTER=PASS requirement. |
nextflow.config:84, module/main.nf:573 |
--hervk_sva_pair |
true |
Also admit multi-hit records that pair HERVK-int with an SVA hit. RepeatMasker assigns part of the LTR5_Hs sequence to SVA, so it reports a provirus as two or three hits. |
nextflow.config:85, module/main.nf:570-571 |
--hervk_pair_max_svlen |
10500 (bp) |
|SVLEN| ceiling for that carve-out: a 9472 bp provirus plus tolerance. | nextflow.config:86, module/main.nf:570 |
--hervk_pair_max_hits |
3 (hits) |
n_hits ceiling for the same carve-out. Three admits a provirus whose internal region RepeatMasker split in two; 2 restores the earlier behavior. |
nextflow.config:87, module/main.nf:555-570 |
Whitelist syntax
The *_ids parameters are comma-separated lists of bcftools regular expressions matched against
repeat_ids. bcftools regexes support ^, $, ., * and [...] and have no alternation,
which is why they are lists. ~ is applied to each element of the field, so ^ anchors per
element. An empty string keeps the whole class. nextflow.config:67-69, module/main.nf:534-538
See Human mobile element insertions for the assembled expression.
HERV-K classifier and locus reconciliation¶
All --human only. hervk_annotate runs after concat_repeatmask and reads the raw RepeatMasker
tables; hervk_reconcile runs after merge_VCFs.
| Parameter | Default | Effect | Source |
|---|---|---|---|
--hervk_config |
null |
JSON file overriding the classifier's thresholds. Template at utils/HERVK.config.json. |
nextflow.config:66, module/main.nf:324 |
--hervk_max_svlen |
25000 (bp) |
|SVLEN| ceiling for HERV-K candidacy. Applied when the candidate list is built, before the reference windows are masked, so an oversized record costs no masking. | nextflow.config:89, module/main.nf:348 |
--hervk_ref_flank |
1500 (bp) |
Reference sequence masked on each side of a candidate footprint to establish the REF state. | nextflow.config:113, module/main.nf:356,360 |
--hervk_ref_annotation |
null |
A precomputed RepeatMasker .out or BED for the reference. When set, the in-pipeline masking is skipped. |
nextflow.config:118, module/main.nf:353-356 |
--hervk_locus_window |
1200 (bp) |
Largest gap between two record footprints that still counts as one locus: one LTR plus tolerance. | nextflow.config:114, module/main.nf:388 |
--hervk_strict |
false |
Drop candidates classed other or below the confidence floor from pangenome.human.vcf. Off by default because dropping records hid a classifier failure before. |
nextflow.config:120, module/main.nf:325,378 |
--hervk_reconcile |
true |
Consolidate flagged HERV-K loci in the human subset of the genotyped calls. Reads vg call genotypes: giraffe, graphaligner or precomputed. |
nextflow.config:99, main.nf:286,302, bin/hervk_reconcile.py:434 |
--hervk_reconcile_vcf |
null |
Consolidate against this genotyped VCF from an earlier run instead of one produced now. Pair it with --genotype false. |
nextflow.config:95, main.nf:302-314 |
--hervk_mask_graph_gt_at_cnv |
true |
Withhold the graph genotypes at copy-number loci, where reads from the pre-existing reference copy give non-carriers ALT support. The calls are kept either way. | nextflow.config:103, module/main.nf:442-444 |
--graffite_vcf with --human and the default --hervk_reconcile true stops at launch, because
the reconciler needs the outputs of hervk_annotate and that process only runs during discovery.
Pass --hervk_reconcile false, or enter from --RM_dir. main.nf:61-63
A --human run that genotypes with --graph_method pangenie also stops at launch while
--hervk_reconcile is true, because the reconciler reads vg call genotypes and PanGenie does
not produce them. Pass --hervk_reconcile false, or genotype with giraffe, graphaligner or
precomputed. main.nf:65-71
Stage 3: graph mapping and genotyping¶
| Parameter | Default | Effect | Source |
|---|---|---|---|
--genotype |
true |
Run Stage 3. Set false to stop after annotation. |
nextflow.config:37, main.nf:188 |
--graph_method |
"pangenie" |
One of pangenie, giraffe, graphaligner, precomputed. See below. |
nextflow.config:38, main.nf:200-206,263 |
--min_mapq |
0 |
vg pack -Q, the lowest mapping quality a read needs to contribute coverage. Ignored by pangenie. |
nextflow.config:125, module/main.nf:845,853 |
--min_support |
"2,4" |
vg call -m, minimum support to call an allele, as ref,alt. Ignored by pangenie. |
nextflow.config:126, module/main.nf:874 |
--graph_method |
Graph | Read mapping | Notes |
|---|---|---|---|
pangenie |
PanGenie-index on the annotated VCF |
k-mer counting, no alignment | Written for short reads. The read preset, --min_mapq and --min_support do nothing. |
giraffe |
vg autoindex |
vg giraffe |
Short reads interleaved (-i) unless the samplesheet type selects a long-read preset. |
graphaligner |
vg construct |
GraphAligner |
Long reads. |
precomputed |
supplied with --graph |
supplied with --graph_alignments, or skipped with --vcfs |
Builds nothing. Without --graph and one of the two, the run stops at launch. |
main.nf:53-56,200-232, module/main.nf:788-801,842-860
Reusing existing intermediates¶
Each of these replaces the process that would produce it.
| Parameter | Default | Effect | Source |
|---|---|---|---|
--graffite_vcf |
false |
Skip Stages 1 and 2 and genotype this pangenome.vcf from an earlier run. |
nextflow.config:34, main.nf:183-186 |
--vcf |
false |
Skip Stage 1. Annotate this one merged SV VCF. Cannot be combined with a discovery flag. | nextflow.config:35, main.nf:46-49,148-149 |
--RM_dir |
false |
Skip RepeatMasker. Reuse a 2_Repeat_Filtering/ directory whose subdirectories each hold genotypes_repmasked_filtered.vcf and repeatmasker_dir/. |
nextflow.config:36, main.nf:133-142 |
--graph |
false |
A graph index directory as make_graph writes it (index.gfa, index.pb, and index.giraffe.gbz for giraffe). Skips make_graph. |
nextflow.config:40, main.nf:210-214 |
--graph_alignments |
false |
Samplesheet of graph alignments (sample,gaf,pack). Skips graph_align_reads. |
nextflow.config:41, main.nf:223-225 |
--vcfs |
false |
Samplesheet of per-sample vg call VCFs. Skips alignment and vg_call. |
nextflow.config:42, main.nf:218-220 |
See Resuming and skipping work.
Stage 3.2: epigenetic mapping (--epigenomes)¶
Needs the panmethyl submodule and one of the giraffe, graphaligner or precomputed methods;
the branch sits inside that block. main.nf:12,234
| Parameter | Default | Effect | Source |
|---|---|---|---|
--epigenomes |
false |
Lift per-read modification calls from the genotyping BAMs onto the graph and annotate the genotyped VCFs with them. | nextflow.config:33, main.nf:234-258 |
--code |
"C+m" |
The SAM MM/ML modification code to extract. |
nextflow.config:169, main.nf:245 |
--motif |
"CG" |
Motif indexed on the graph. | nextflow.config:170, main.nf:236 |
--lifted |
false |
Samplesheet of modification tables already lifted onto the graph; skips extraction and lifting. | nextflow.config:171, main.nf:239-241 |
--bed |
false |
A BED file to project onto the graph and annotate with methylation levels. | nextflow.config:172, main.nf:253-256 |
See Epigenetic mapping.
Resources¶
Global switches¶
| Parameter | Default | Effect | Source |
|---|---|---|---|
--cores |
false |
An integer here overrides the cpus of every process that reads a *_threads parameter, and the 32 of pav_asm. The processes fixed at one CPU are unaffected. |
nextflow.config:55,184-350 |
--out |
"out" |
Root of the published output tree. | nextflow.config:53 |
--container_tmp |
false |
Directory bound to /tmp inside the container. When unset, the directory each task runs in: its directory under work/, or its scratch directory under -profile cluster. Set it when that filesystem is small, slow, or unwritable from the container. |
nextflow.config:51,181 |
Per-process allocation¶
Memory and time values are Nextflow strings ("10G", "12h"). Where one parameter serves several processes, they are listed once.
A null memory default means no memory directive
Seven of these default to null, which means the process declares no memory requirement. A
scheduler that needs one, or a memory-hungry step such as pangenie, needs the value set.
| Parameter | Default | Processes | Source |
|---|---|---|---|
--map_asm_threads |
1 |
map_asm |
nextflow.config:141,189 |
--map_asm_memory |
null |
map_asm |
nextflow.config:140,190 |
--map_asm_time |
"3h" |
map_asm |
nextflow.config:142,191 |
--map_longreads_threads |
1 |
map_longreads |
nextflow.config:144,194 |
--map_longreads_memory |
null |
map_longreads |
nextflow.config:143,195 |
--map_longreads_time |
"12h" |
map_longreads |
nextflow.config:145,196 |
--sniffles_threads |
1 |
sniffles_sample_call, sniffles_population_call |
nextflow.config:155,199,204 |
--sniffles_memory |
null |
same | nextflow.config:154,200,205 |
--sniffles_time |
"12h" |
same | nextflow.config:156,201,206 |
--svim_asm_threads |
1 |
svim_asm, truvari_merge |
nextflow.config:160,209,214 |
--svim_asm_memory |
null |
same | nextflow.config:159,210,215 |
--svim_asm_time |
"12h" |
same | nextflow.config:161,211,216 |
--pav_memory |
"120G" |
pav_asm (its cpus is the literal 32 unless --cores is set) |
nextflow.config:157,346-347 |
--pav_time |
"12h" |
pav_asm |
nextflow.config:158,348 |
--repeatmasker_threads |
1 |
split_repeatmask, repeatmask_VCF, concat_repeatmask |
nextflow.config:152,219,224,229 |
--repeatmasker_memory |
"10G" |
same | nextflow.config:151,220,225,230 |
--repeatmasker_time |
"12h" |
same | nextflow.config:153,221,226,231 |
--tsd_memory |
"10G" |
tsd_prep, tsd_search, tsd_report (one CPU each) |
nextflow.config:162,235,240,245 |
--tsd_time |
"1h" |
same | nextflow.config:163,236,241,246 |
--hervk_annotate_threads |
1 |
hervk_annotate |
nextflow.config:133,295 |
--hervk_annotate_memory |
"10G" |
hervk_annotate |
nextflow.config:132,296 |
--hervk_annotate_time |
"12h" |
hervk_annotate |
nextflow.config:134,297 |
--hervk_reconcile_memory |
"10G" |
hervk_reconcile (one CPU) |
nextflow.config:135,301 |
--hervk_reconcile_time |
"1h" |
hervk_reconcile |
nextflow.config:136,302 |
--pangenie_threads |
1 |
pangenie_index, pangenie |
nextflow.config:149,249,254 |
--pangenie_memory |
"32G" |
same | nextflow.config:148,250,255 |
--pangenie_time |
"12h" |
same | nextflow.config:150,251,256 |
--make_graph_threads |
1 |
make_graph |
nextflow.config:138,259 |
--make_graph_memory |
"40G" |
make_graph |
nextflow.config:137,260 |
--make_graph_time |
"6h" |
make_graph |
nextflow.config:139,261 |
--graph_align_threads |
1 |
bam_to_fastq, graph_align_reads |
nextflow.config:130,264,269 |
--graph_align_memory |
null |
same | nextflow.config:129,265,270 |
--graph_align_time |
"12h" |
same | nextflow.config:131,266,271 |
--vg_call_threads |
1 |
vg_call |
nextflow.config:165,275 |
--vg_call_memory |
null |
vg_call |
nextflow.config:164,276 |
--vg_call_time |
"2h" |
vg_call |
nextflow.config:166,277 |
--merge_vcf_memory |
"10G" |
merge_VCFs, trusted_genotypes, genotyping_audit (one CPU each) |
nextflow.config:146,281,286,291 |
--merge_vcf_time |
"1h" |
same | nextflow.config:147,282,287,292 |
break_scaffold runs on one CPU with no memory or time directive. The eight methylation processes
have fixed allocations of 40 to 60 GB and 6 h that no parameter changes. See
Resources and scaling for the full table.
nextflow.config:185-187,304-343
truvari_merge shares the svim-asm parameters
The merge has no parameters of its own. It shards the merged VCF with truvari divide and runs
truvari collapse on task.cpus shards at once, so --svim_asm_threads also speeds up
merging. module/main.nf:250-257
RepeatMasker threading¶
bin/repmask_vcf.sh ignores task.cpus. It passes nproc / 4 (at least 1) to RepeatMasker's -pa
and nproc to ULTRA's -t. On a node where nproc reports the host's cores rather than the cores
allocated to the job, both run wider than the allocation. bin/repmask_vcf.sh:67,75,92
Deprecated and inert¶
| Parameter | Default | Status | Source |
|---|---|---|---|
--mammal |
false |
Inert since v1.1. Still passed to bin/repmask_vcf.sh, which prints a notice and does nothing else. L1 5' inversions and SVA VNTR-only polymorphisms are always reported, through the L1_5PINV INFO field and the (VNTR_only) suffix on repeat_ids. The mam_filter_1 and mam_filter_2 fields no longer exist. |
nextflow.config:56, bin/repmask_vcf.sh:165-169 |
--hervk_mask_tandem |
null |
Old name of --hervk_mask_graph_gt_at_cnv. When set, its value wins over the new name. |
nextflow.config:112, module/main.nf:442-443 |
Nextflow's own options¶
Single dash. These are the ones you will use most.
| Option | Effect |
|---|---|
-profile |
standard (local), cluster (SLURM) or cloud (AWS). See Resources and scaling. |
-resume |
Reuse cached results from the previous run of the same pipeline in the same directory. |
-r |
Git revision (branch, tag or commit) when running straight from GitHub. |
-latest |
Pull the newest commit of -r before running. |
-with-report |
Write an HTML execution report with per-process CPU and memory peaks. Useful for tuning the table above. |
-with-trace |
Write a tab-delimited trace of every task. |
-c |
Add a config file, for site-specific executor settings. |
Full list in the Nextflow CLI documentation.