allele-methods | R Documentation |
Extract reference and alternate alleles and allele counts from a GDS object.
## S4 method for signature 'SeqVarGDSClass'
refChar(gdsobj)
## S4 method for signature 'SeqVarGDSClass'
altChar(gdsobj, n=0)
## S4 method for signature 'SeqVarGDSClass'
nAlleles(gdsobj)
gdsobj |
A |
n |
An integer indicating which alternate allele to return. |
These methods parse the "allele" field of a GDS object.
refChar
returns a character vector of reference alleles.
altChar
returns a character vector of alternate alleles. If
n=0
, multiple alternate alleles are represented as a
comma-separated string. If n>0
, only the n
th alternate
allele is returned.
nAlleles
returns an integer vector of the number of alleles
(reference and alternate) for each variant.
Stephanie Gogarten
SeqVarGDSClass
,
applyMethod
gds <- seqOpen(seqExampleFileName("gds"))
table(refChar(gds))
table(altChar(gds))
table(altChar(gds, n=1))
table(altChar(gds, n=2), useNA="ifany")
table(nAlleles(gds))
seqClose(gds)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.