Skip to content

Variant callers

CormacKinsella edited this page Oct 7, 2025 · 1 revision

Variant callers

freebayes workflow

bamtools coverage + coverage_to_regions.py

Prints coverage statistics from the input BAM file and converts to regions with even sequencing coverage for parallelisation of freebayes.

Usage: bamtools [--help] COMMAND [ARGS] | /opt/conda/bin/coverage_to_regions.py fasta_index num_regions >regions.bed

Example grave command:

bamtools coverage -in ${bams} | coverage_to_regions.py ${fasta_index} 500 > ${reference_fasta}.regions

freebayes-parallel

Runs freebayes in parallel over regions listed in the regions file, using ncpus processors. Will merge and sort output, producing a uniform VCF stream on stdout.

Usage: freebayes-parallel [regions file] [ncpus] [freebayes arguments]

Example grave command:

freebayes-parallel ${reference_fasta}.regions ${task.cpus} --genotype-qualities --fasta-reference ${reference_fasta} --min-alternate-count ${params.minimumAlleleSupport} --min-alternate-fraction ${params.minFraction} --ploidy ${params.samplePloidy} --max-complex-gap ${params.maxComplexGap} ${bams}

bcftools norm

Left-align and normalize indels.

Usage: bcftools norm [options] <in.vcf.gz>

Example grave command:

bcftools norm -f ${reference_fasta} ${meta.id}.raw.vcf.gz

bcftools sort

Sorts variants to genome order.

Usage: bcftools sort [OPTIONS] <FILE.vcf>

Example grave command:

bcftools sort

DeepVariant workflow

Pangenome aware DeepVariant

Run the pangenome aware version of DeepVariant. Note this is currently only recommended for human samples due to the training of the underlying model.

Usage: run_pangenome_aware_deepvariant.py [options]

Example grave command:

/opt/deepvariant/bin/run_pangenome_aware_deepvariant --num_shards ${task.cpus} --sample_name_reads ${meta.id} --ref ${reference_fasta} --pangenome ${graph} --reads ${bams} --output_vcf ${meta.id}.raw.vcf.gz --vcf_stats_report --model_type ${params.deepVariantModelType}

bcftools norm

Left-align and normalize indels.

Usage: bcftools norm [options] <in.vcf.gz>

Example grave command:

bcftools norm -f ${reference_fasta} ${deepvariant_vcf}

bcftools sort

Sorts variants to genome order.

Usage: bcftools sort [OPTIONS] <FILE.vcf>

Example grave command:

bcftools sort

Clone this wiki locally