effectAllele: Return the effect allele for association testing

Description Usage Arguments Details Value Author(s) See Also Examples

Description

effectAllele returns the effect allele for association testing.

Usage

1
2
3
4
## S4 method for signature 'SeqVarGDSClass'
effectAllele(gdsobj, variant.id=NULL)
## S4 method for signature 'GenotypeData'
effectAllele(gdsobj, variant.id=NULL)

Arguments

gdsobj

An object of class SeqVarIterator from the package SeqVarTools, or an object of class GenotypeIterator from the package GWASTools, containing the genotype data for the variants and samples to be used for the analysis.

variant.id

A vector of identifiers for variants to return.

Details

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.

Value

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

Author(s)

Stephanie M. Gogarten

See Also

assocTestSingle, assocTestAggregate

Examples

 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)

GENESIS documentation built on Jan. 30, 2021, 2:01 a.m.