queryVCF {gQTLstats} | R Documentation

## obtain SnpMatrix from VCF genotypes

### Description

obtain SnpMatrix from VCF genotypes

### Usage

    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

    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

[Package gQTLstats version 1.12.0 Index]