imputedDosage: Get imputed dosage

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

Description

Get matrix of imputed dosage values from a GDS object

Usage

1
2
## S4 method for signature 'SeqVarGDSClass'
imputedDosage(gdsobj, dosage.field="DS", use.names=TRUE)

Arguments

gdsobj

A SeqVarGDSClass object with VCF data.

dosage.field

The name of the dosage field in the GDS object (will be prepended with "annotation/format").

use.names

A logical indicating whether to assign sample and variant IDs as dimnames of the resulting matrix.

Details

Reads dosage from the dosage-specific field in the GDS object, rather than counting alleles from called genotypes.

Only one dosage value per variant is allowed; the method will return an error if multiple dosages are present for a single variant.

Value

A numeric matrix of dosage values with dimensions [sample,variant].

Author(s)

Stephanie Gogarten

See Also

refDosage, altDosage

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# convert VCF to GDS keeping dosage field
vcffile <- system.file("extdata", "gl_chr1.vcf", package="SeqVarTools")
gdsfile <- tempfile()
seqVCF2GDS(vcffile, gdsfile, fmt.import="DS", storage.option="ZIP_RA",
           verbose=FALSE)

gds <- seqOpen(gdsfile)
dos <- imputedDosage(gds)
head(dos)
seqClose(gds)
unlink(gdsfile)

SeqVarTools documentation built on Nov. 22, 2020, 2 a.m.