Learn R Programming

seqminer (version 2.0)

readVCFToMatrixByGene: Read a gene from VCF file and return a genotypes matrix

Description

Read a gene from VCF file and return a genotypes matrix

Usage

readVCFToMatrixByGene(fileName, geneFile, geneName,
    annoType)

Arguments

fileName
charactr, represents an input VCF file (Bgzipped, with Tabix index)
geneFile
character, a text file listing all genes in refFlat format
geneName
character vector, which gene(s) to be extracted
annoType
character, annotated types you would like to extract, such as "Nonsynonymous", "Synonymous". This can be left empty.

Value

  • genotype matrix

See Also

http://zhanxw.com/seqminer/ for online manual and examples

Examples

Run this code
fileName = system.file("vcf/all.anno.filtered.extract.vcf.gz", package = "seqminer")
geneFile = system.file("vcf/refFlat_hg19_6col.txt.gz", package = "seqminer")
cfh <- readVCFToMatrixByGene(fileName, geneFile, "CFH", "Synonymous")

Run the code above in your browser using DataLab