effectAllele | R Documentation |
effectAllele
returns the effect allele for association testing.
## S4 method for signature 'SeqVarGDSClass'
effectAllele(gdsobj, variant.id=NULL)
## S4 method for signature 'GenotypeData'
effectAllele(gdsobj, variant.id=NULL)
gdsobj |
An object of class |
variant.id |
A vector of identifiers for variants to return. |
effectAllele
returns the effect allele corresponding to association test results from assocTestSingle
or assocTestAggregate
. variant.id
allows the user to specify for which variants effect alleles should be returned.
A data.frame with the following columns:
variant.id |
The variant ID |
effect.allele |
The character value for the effect allele |
other.allele |
The character value for the other (non-effect) allele |
Stephanie M. Gogarten
assocTestSingle
, assocTestAggregate
library(SeqVarTools)
library(Biobase)
# open a sequencing GDS file
gdsfile <- seqExampleFileName("gds")
gds <- seqOpen(gdsfile)
# simulate some phenotype data
set.seed(4)
data(pedigree)
pedigree <- pedigree[match(seqGetData(gds, "sample.id"), pedigree$sample.id),]
pedigree$outcome <- rnorm(nrow(pedigree))
# construct a SeqVarIterator object
seqData <- SeqVarData(gds, sampleData=AnnotatedDataFrame(pedigree))
iterator <- SeqVarBlockIterator(seqData)
# fit the null model
nullmod <- fitNullModel(iterator, outcome="outcome", covars="sex")
# run the association test
assoc <- assocTestSingle(iterator, nullmod)
# add effect allele to the results
eff <- effectAllele(seqData, variant.id=assoc$variant.id)
assoc <- dplyr::left_join(assoc,eff)
head(assoc)
seqClose(iterator)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.