vcf2dosage: Convert VCF to dose

vcf2dosageR Documentation

Convert VCF to dose

Description

Convert genotypes at bi-allelic variants from a VCF file into allele doses. This is also doable with bcftools +dosage.

Usage

vcf2dosage(
  vcf.file,
  genome = "",
  gdose.file,
  ca.file,
  yieldSize = NA_integer_,
  dict.file = NULL,
  seq.id = NULL,
  seq.start = NULL,
  seq.end = NULL,
  field = "GT",
  verbose = 1
)

Arguments

vcf.file

path to the VCF file (if the bgzip index doesn't exist in the same directory, it will be created)

genome

genome identifier (e.g. "VITVI_12x2")

gdose.file

path to the output file to record genotypes as allele doses (will be gzipped); variants will be in rows and samples in columns

ca.file

path to the output file to record SNP 1-based coordinates and alleles (will be gzipped)

yieldSize

number of records to yield each time the file is read from (see ?TabixFile) if seq.id is NULL

dict.file

path to the SAM dict file (see https://broadinstitute.github.io/picard/command-line-overview.html#CreateSequenceDictionary) if seq.id is specified with no start/end

seq.id

see seqIdStartEnd2GRanges

seq.start

see seqIdStartEnd2GRanges

seq.end

see seqIdStartEnd2GRanges

field

the genotypes to convert should come from the "GT" or "DS" fields

verbose

verbosity level (0/1)

Value

an invisible list with both output file paths

Author(s)

Timothee Flutre

See Also

gtVcf2dose, dsVcf2dose, filterVariantCalls


timflutre/rutilstimflutre documentation built on Feb. 7, 2024, 8:17 a.m.