effectAllele {GENESIS} | R Documentation

## Return the effect allele for association testing

### Description

`effectAllele` returns the effect allele for association testing.

### Usage

    ## 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

    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)

[Package GENESIS version 2.22.2 Index]