countSingletons {SeqVarTools} | R Documentation

## Count singletons

### Description

Count singleton variants for each sample

### Usage

    ## S4 method for signature 'SeqVarGDSClass'
    countSingletons(gdsobj, use.names=FALSE)

### Arguments

`gdsobj` | A `SeqVarGDSClass` object with VCF data.
`use.names` | A logical indicating whether to assign variant IDs as names of the output vector.

### Details

A singleton variant is a variant in which only one sample has a non-reference allele. For each sample, `countSingletons` finds the number of variants for which that sample has the only non-reference allele.

### Value

A vector of the number of singleton variants per sample.

### Author(s)

Stephanie Gogarten

### See Also

`SeqVarGDSClass`, `applyMethod`, `alleleFrequency`

### Examples

    gds <- seqOpen(seqExampleFileName("gds"))
    head(countSingletons(gds))
    seqClose(gds)

[Package SeqVarTools version 1.32.0 Index]