variantInfo: Variant info

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

Description

Return basic variant info as a data.frame.

Usage

1
2
3
4
## S4 method for signature 'SeqVarGDSClass'
variantInfo(gdsobj, alleles=TRUE, expanded=FALSE)
## S4 method for signature 'SeqVarGDSClass'
expandedVariantIndex(gdsobj)

Arguments

gdsobj

A SeqVarGDSClass object with VCF data.

alleles

A logical value for whether to include ref and alt alleles

expanded

A logical value for whether to expand multi-allelic variants with one row per alternate allele.

Details

Variants can be represented in collapsed form, with one row per variant, or in expanded form, with one row per alternate allele for multiallelic variants.

Value

variantInfo returns a data.frame with variant.id, chromosome, and position for each variant. If alleles=TRUE, the data.frame includes ref and alt. If expanded=TRUE, the data.frame includes allele.index, which is 1 for the first alternate allele, 2 for the second alternate, etc.

expandedVariantIndex returns an index to transform a vector or matrix from collapsed to expanded form.

Author(s)

Stephanie Gogarten

See Also

SeqVarGDSClass

Examples

1
2
3
4
5
6
gds <- seqOpen(seqExampleFileName("gds"))
seqSetFilter(gds, variant.sel=1323:1327)
variantInfo(gds, alleles=TRUE)
variantInfo(gds, alleles=TRUE, expanded=TRUE)
expandedVariantIndex(gds)
seqClose(gds)

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