Description Usage Arguments Details Value Author(s) See Also Examples
Get matrix of imputed dosage values from a GDS object
1 2 | ## S4 method for signature 'SeqVarGDSClass'
imputedDosage(gdsobj, dosage.field="DS", use.names=TRUE)
|
gdsobj |
A |
dosage.field |
The name of the dosage field in the GDS object (will be prepended with |
use.names |
A logical indicating whether to assign sample and variant IDs as dimnames of the resulting matrix. |
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.
A numeric matrix of dosage values with dimensions [sample,variant].
Stephanie Gogarten
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.