variantInfo {SeqVarTools} | R Documentation

## Variant info

### Description

Return basic variant info as a data.frame.

### Usage

    ## 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

    gds <- seqOpen(seqExampleFileName("gds"))
    seqSetFilter(gds, variant.sel=1323:1327)
    variantInfo(gds, alleles=TRUE)
    variantInfo(gds, alleles=TRUE, expanded=TRUE)
    expandedVariantIndex(gds)
    seqClose(gds)

[Package SeqVarTools version 1.32.0 Index]