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

`assocTestSingle`

performs genotype association tests
using the null model fit with `fitNullModel`

.

1 2 3 4 5 6 | ```
## S4 method for signature 'SeqVarIterator'
assocTestSingle(gdsobj, null.model, test=c("Score", "Wald"),
GxE=NULL, sparse=TRUE, verbose=TRUE)
## S4 method for signature 'GenotypeIterator'
assocTestSingle(gdsobj, null.model, test=c("Score", "Wald"),
GxE=NULL, verbose=TRUE)
``` |

`gdsobj` |
An object of class |

`null.model` |
A null model object returned by |

`test` |
A character string specifying the type of test to be performed. The possibilities are |

`GxE` |
A vector of character strings specifying the names of the variables for which a genotype interaction term should be included. If |

`sparse` |
Logical indicator of whether to read genotypes as sparse Matrix objects; the default is |

`verbose` |
Logical indicator of whether updates from the function should be printed to the console; the default is |

Sporadic missing genotype values are mean imputed using the minor allele frequency (MAF) calculated on all other samples at that variant.

The input `GxE`

can be used to perform GxE tests. Multiple interaction variables may be specified, but all interaction variables specified must have been included as covariates in fitting the null model with `fitNullModel`

. When performing GxE analyses, `assocTestSingle`

will report two tests: (1) the joint test of all genotype interaction terms in the model (this is the test for any genotype interaction effect), and (2) the joint test of the genotype term along with all of the genotype interaction terms (this is the test for any genetic effect). Individual genotype interaction terms can be tested by creating Wald test statistics from the reported effect size estimates and their standard errors (Note: when `GxE`

contains a single continuous or binary covariate, this test is the same as the test for any genotype interaction effect mentioned above).

A data.frame where each row refers to a different variant with the columns:

`variant.id` |
The variant ID |

`chr` |
The chromosome value |

`pos` |
The base pair position |

`allele.index` |
The index of the alternate allele. For biallelic variants, this will always be 1. |

`n.obs` |
The number of samples with non-missing genotypes |

`freq` |
The estimated alternate allele frequency |

If `test`

is `"Score"`

:

`Score` |
The value of the score function |

`Score.SE` |
The estimated standard error of the Score |

`Score.Stat` |
The score Z test statistic |

`Score.pval` |
The score p-value |

If `test`

is `"Wald"`

and `GxE`

is `NULL`

:

`Est` |
The effect size estimate for each additional copy of the alternate allele |

`Est.SE` |
The estimated standard error of the effect size estimate |

`Wald.Stat` |
The Wald Z test statistic |

`Wald.pval` |
The Wald p-value |

If `test`

is `"Wald"`

and `GxE`

is not `NULL`

:

`Est.G` |
The effect size estimate for the genotype term |

`Est.G:env` |
The effect size estimate for the genotype*env interaction term. There will be as many of these terms as there are interaction variables, and "env" will be replaced with the variable name. |

`SE.G` |
The estimated standard error of the genotype term effect size estimate |

`SE.G:env` |
The estimated standard error of the genotype*env effect size estimate. There will be as many of these terms as there are interaction variables, and "env" will be replaced with the variable name. |

`GxE.Stat` |
The Wald Z test statistic for the test of all genotype interaction terms. When there is only one genotype interaction term, this is the test statistic for that term. |

`GxE.pval` |
The Wald p-value for the test of all genotype interaction terms; i.e. the test of any genotype interaction effect |

`Joint.Stat` |
The Wald Z test statistic for the joint test of the genotype term and all of the genotype interaction terms |

`Joint.pval` |
The Wald p-value for the joint test of the genotype term and all of the genotype interaction terms; i.e. the test of any genotype effect |

The effect size estimate is for each copy of the alternate allele. For multiallelic variants, each alternate allele is tested separately.

Matthew P. Conomos, Stephanie M. Gogarten, Tamar Sofer, Ken Rice, Chaoyu Yu

`fitNullModel`

for fitting the null mixed model needed as input to `assocTestSingle`

.
`SeqVarIterator`

for creating the input object with genotypes.

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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | ```
library(SeqVarTools)
library(Biobase)
# open a sequencing GDS file
gdsfile <- seqExampleFileName("gds")
gds <- seqOpen(gdsfile)
# simulate some phenotype data
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)
seqClose(iterator)
library(GWASTools)
# open a SNP-based GDS file
gdsfile <- system.file("extdata", "HapMap_ASW_MXL_geno.gds", package="GENESIS")
gds <- GdsGenotypeReader(filename = gdsfile)
# simulate some phenotype data
pheno <- data.frame(scanID=getScanID(gds),
outcome=rnorm(nscan(gds)))
# construct a GenotypeIterator object
genoData <- GenotypeData(gds, scanAnnot=ScanAnnotationDataFrame(pheno))
iterator <- GenotypeBlockIterator(genoData)
# fit the null model
nullmod <- fitNullModel(iterator, outcome="outcome")
# run the association test
assoc <- assocTestSingle(iterator, nullmod)
close(iterator)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.