mixedVCFtoSnpMatrix: amalgamate called genotypes and imputed allelic dosages in...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/mixedVcfToSM.R

Description

amalgamate called genotypes and imputed allelic dosages in VCF to SnpMatrix representation

Usage

1
mixedVCFtoSnpMatrix(vcf, preferGT = TRUE)

Arguments

vcf

object inheriting from CollapsedVCF-class

preferGT

logical. VCF allows loci for samples to be reported in various formats, and a given locus can have a call tagged GT and a genotype probability or likelihood representation tagged GP or GL. genotypeToSnpMatrix has an uncertain parameter that, if TRUE, will transform GP or GL content to allelic dose. Note that only the "first" dosage type appearing in the header will be transformed. Thus if GP is first in the header but a given locus is tagged only with GL, the genotype for thus locus will be recorded as NA.

Details

emulates output from genotypeToSnpMatrix

Value

list with elements genotypes and map

Author(s)

VJ Carey

See Also

genotypeToSnpMatrix

Examples

1
2
3
4
5
fn = system.file("vcf/polytypeSNV.vcf", package="gQTLstats")
require("VariantAnnotation")
require("snpStats")
vv = readVcf(fn, genome="hg19") # only 4th SNP will have dosage coding
mixedVCFtoSnpMatrix(vv)$genotypes@.Data

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