read_snps_from_vcf: Read SNP genotypes from VCF files.

Description Usage Arguments Value

View source: R/internal.R

Description

This function reads SNP genotype data from one or more VCF files, and returns these as a matrix of SNP genotypes - effectively variant base calls.

Usage

1
2
3
4
5
6
7
8
read_snps_from_vcf(
  infiles,
  samples = NULL,
  max.seqlength = NULL,
  require.all = FALSE,
  require.any = FALSE,
  require.polymorphic = FALSE
)

Arguments

infiles

Input VCF file paths.

samples

Optional vector of samples for which SNP genotypes should be obtained. If not specified, genotypes are returned for all available samples.

max.seqlength

Optional parameter to indicate the maximum reference sequence length, which is used to determine the zero-padded width of genomic positions in SNP marker IDs. Without this information, SNP marker IDs may be formatted inconsistently in different datasets.

require.all

Remove variants that are not completely genotyped with respect to the given samples.

require.any

Remove variants that do not have at least one genotype call among the given samples.

require.polymorphic

Remove variants that do not have at least two different genotype calls among the given samples.

Value

A matrix object containing SNP genotype data.


gact/utl documentation built on June 1, 2021, 4:24 p.m.