ReadVcf: Read a vcf file

View source: R/ReadVcf.R

ReadVcfR Documentation

Read a vcf file

Description

This function reads a vcf file and returns the contents as a genotype object.

Usage

ReadVcf(file = "")

Arguments

file

The path to the vcf file, can be compressed (.vcf or .vcf.gz).

Details

This function reads a vcf file, containing the tab separated fields CHROM, POS, REF, ALT, ID, QUAL, INFO, FORMAT, and an undefined additional number of columns with genotypes (column titles are the genotype names, typically patient IDs), and returns a genotype object (genotypes as a sparse matrix in vartrix conventions, and associated metadata as a data frame).

Value

genotype object

Examples

genotypes <- ReadVcf("MyFolder/Myfile.vcf.gz")

nbroguiere/burgertools documentation built on Jan. 30, 2024, 3:48 a.m.