queryVCF: obtain SnpMatrix from VCF genotypes

Description Usage Arguments Value Examples

Description

obtain SnpMatrix from VCF genotypes

Usage

1
2
queryVCF(gr, vcf.tf, samps, genome = "hg19", getSM = TRUE,
   snvOnly=TRUE)

Arguments

gr

GRanges instance; SNPs lying within will be processed

vcf.tf

TabixFile instance pointing to VCF

samps

samples to be retained

genome

tag identifying build

getSM

logical; if FALSE, genotypeToSnpMatrix will not be run and only the output of readVcf is returned.

snvOnly

logical, if TRUE, will confine results to SNV

Value

a list of length two

readout

output of readVcf

sm

output of genotypeToSnpMatrix run on the read result

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
require(Rsamtools)
tf20 = TabixFile(system.file("vcf/c20exch.vcf.gz", package="gQTLstats"))
require(geuvPack)
data(geuFPKM)
lgeu = geuFPKM[ which(seqnames(geuFPKM)=="chr20"), 
    which(geuFPKM$popcode=="CEU") ]
seqlevelsStyle(lgeu) = "NCBI"
rng = rowRanges(lgeu)[232] # CPNE1
myq = queryVCF( rng, tf20, samps=colnames(lgeu), genome="hg19" )
myq

gQTLstats documentation built on Nov. 8, 2020, 7:53 p.m.