SingleSnpTests-class {snpStats} | R Documentation

## Classes "SingleSnpTests" and "SingleSnpTestsScore"

### Description

These are classes to hold the objects created by `single.snp.tests` and provide methods for extracting key elements. The class `"SingleSnpTestsScore"` extends class `"SingleSnpTests"` to include the score and score variance statistics in order to provide methods for pooling results from several studies or parts of a study

### Objects from the Class

Objects can be created by calls of the form `new("SingleSnpTests", ...)` and `new("SingleSnpTestsScore", ...)` but, more usually, will be created by calls to `single.snp.tests`

### Slots

`snp.names`:

  The names of the SNPs tested, as they appear as column names in the original `SnpMatrix`

`chisq`:

  A two-column matrix holding the 1 and 2 df association tests

`N`:

  The numbers of observations included in each test

`N.r2`:

  For tests on imputed SNPs, the product of `N` and the imputation r^2. Otherwise a zero-length object

`U`:

  (class `"SingleSnpTestsScore"`) Score statistics

`V`:

  (class `"SingleSnpTestsScore"`) Score variances

### Methods

[]

  `signature(x = "SingleSnpTests", i = "ANY")`: Subsetting operator

[]

  `signature(x = "SingleSnpTestsScore", i = "ANY")`: Subsetting operator

chi.squared

  `signature(x = "SingleSnpTests", df = "numeric")`: Extract 1- and 2-df chi-squared test values

effect.sign

  `signature(x = "SingleSnpTestsScore", simplify = "missing")`: Extract signs of associations tested by the 1df tests

names

  `signature(x="SingleSnpTests")`: Extract names of test values (`snp.names` slot)

p.value

  `signature(x = "SingleSnpTests", df = "numeric")`: Evaluate 1- and 2-df test p-values

show

  `signature(object = "SingleSnpTests")`: List all tests and p-values

coerce

  `signature(from = "SingleSnpTests", to = "data.frame")`: Conversion to data frame class

sample.size

  `signature(object = "SingleSnpTests")`: Extract sample sizes for tests

effective.sample.size

  `signature(object = "SingleSnpTests")`: Extract effective sample sizes for tests. For imputed tests, these are the real sample sizes multiplied by the corresponding R-squared values for imputation

summary

  `signature(object = "SingleSnpTests")`: Summarize all tests and p-values

pool2

  `signature(x = "SingleSnpTestsScore", y = "SingleSnpTestsScore", score = "logical")`: Combine two sets of test results. Used recursively by `pool`

switch.alleles

  `signature(x = "SingleSnpTestsScore", snps = "ANY")`: Emulate, in the score vector and its (co)variances, the effect of switching of the alleles for the specified tests

### Author(s)

David Clayton dc208@cam.ac.uk

### See Also

`single.snp.tests`, `pool`

### Examples

    showClass("SingleSnpTests")
    showClass("SingleSnpTestsScore")

[Package snpStats version 1.44.0 Index]