queryVCF {gQTLstats} | R Documentation |
obtain SnpMatrix from VCF genotypes
queryVCF(gr, vcf.tf, samps, genome = "hg19", getSM = TRUE, snvOnly=TRUE)
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, |
snvOnly |
logical, if TRUE, will confine results to SNV |
a list of length two
readout |
output of readVcf |
sm |
output of genotypeToSnpMatrix run on the read result |
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