R: Read a gene from VCF file and return a genotype matrix

readVCFToMatrixByGene {seqminer} | R Documentation

## Read a gene from VCF file and return a genotype matrix

### Description

Read a gene from VCF file and return a genotype matrix

### Usage

    readVCFToMatrixByGene(fileName, geneFile, geneName, annoType)

### Arguments

`fileName` | character, 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

    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")

[Package seqminer version 8.0 Index]