R: Classes "SingleSnpTests" and "SingleSnpTestsScore"
SingleSnpTests-class
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
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(snpStats)
Loading required package: survival
Loading required package: Matrix
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/snpStats/SingleSnpTests-class.Rd_%03d_medium.png", width=480, height=480)
> ### Name: SingleSnpTests-class
> ### Title: Classes "SingleSnpTests" and "SingleSnpTestsScore"
> ### Aliases: SingleSnpTests-class
> ### [,SingleSnpTests,ANY,missing,missing-method
> ### chi.squared,SingleSnpTests,numeric-method names,SingleSnpTests-method
> ### p.value,SingleSnpTests,numeric-method
> ### sample.size,SingleSnpTests-method
> ### effective.sample.size,SingleSnpTests-method
> ### show,SingleSnpTests-method summary,SingleSnpTests-method
> ### coerce,SingleSnpTests,data.frame-method SingleSnpTestsScore-class
> ### [,SingleSnpTestsScore,ANY,missing,missing-method
> ### effect.sign,SingleSnpTestsScore,missing-method
> ### pool2,SingleSnpTestsScore,SingleSnpTestsScore,logical-method
> ### switch.alleles,SingleSnpTestsScore,ANY-method
> ### Keywords: classes
>
> ### ** Examples
>
> showClass("SingleSnpTests")
Class "SingleSnpTests" [package "snpStats"]
Slots:
Name: snp.names chisq N N.r2
Class: character matrix integer numeric
Known Subclasses: "SingleSnpTestsScore"
> showClass("SingleSnpTestsScore")
Class "SingleSnpTestsScore" [package "snpStats"]
Slots:
Name: U V snp.names chisq N N.r2
Class: matrix matrix character matrix integer numeric
Extends: "SingleSnpTests"
>
>
>
>
>
> dev.off()
null device
1
>