Description Usage Arguments Details Value Author(s) See Also Examples
effectAllele
returns the effect allele for association testing.
1 2 3 4 | ## 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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 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.