readGenoDoseFileFromBcftools: Read SNP genotypes as dosage from bcftools

readGenoDoseFileFromBcftoolsR Documentation

Read SNP genotypes as dosage from bcftools

Description

Read an input file with genotypes as allele dosage as written by bcftools +dosage genos.vcf.gz | tr ' ' '\t' | datamash transpose | gzip > genos_dosage.tsv.gz. Caution, depending on the file size, this may require the allocation of too much RAM for your system.

Usage

readGenoDoseFileFromBcftools(
  genos.file,
  get.coords = TRUE,
  get.alleles = TRUE,
  use.fread = TRUE,
  rm.dup = FALSE,
  verbose = 0
)

Arguments

genos.file

path to the input file containing the SNP genotype data

get.coords

if TRUE, SNP coordinates will also be extracted

get.alleles

if TRUE, SNP alleles will also be extracted

use.fread

if TRUE, fread will be used to speed-up

rm.dup

if TRUE, duplicated SNPs (i.e., with the exact same coordinate) will be removed

verbose

verbosity level (0/1)

Value

list with a matrix of SNP genotypes and optional data frames of SNP coordinates and alleles

Author(s)

Timothee Flutre

See Also

convertVcfToGenoDoseWithBcftools


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