ReadVCF: Read vcf files

Description Usage Arguments Value

View source: R/vcf.R

Description

Read vcf and vcf.gz files having both phased or unphased genotypes. The missing genotypes in vcf file can be presented as '.' or './.' ReadVCF() is based on readVcf() function from VariantAnnotation R package that loads a vcf file as vcf-class object. ReadVCF() extracts the genotypes from vcf-class object and converts them in a vector of strings formed by letters A, T, C, G and a symbol of missing data '?'.

Usage

1

Arguments

x

path/to/filename.vcf or vcf.gz

...

an optional parameter swap that can be passed to Geno2Haps() function. If swap is TRUE, the haplotypes of an individual are swapped.

Value

A list with two elements: vcf-class object and a character vector which elements are strings of letters A, T, C, G, and symbol '?'. The length of vector is 2N, where N is the number of diploid individuals. The length of the string equals to the number of markers in vcf file.


inzilico/imputeqc documentation built on July 28, 2020, 5:31 p.m.