Learn R Programming

wgsea (version 1.8)

pairtest: Generate p values for each SNP for case-control comparisons.

Description

A wrapper for the snpStats function single.snp.tests. Generates p values for the association of each SNP with case or control status.

Usage

pairtest(case, control, n.perm = 0, pheno.perm = NULL, quiet = FALSE)

Arguments

case
SnpMatrix object holding genotypes of case subjects
control
SnpMatrix object holding genotypes of control subjects
n.perm
number of permutations of case control status required to generate permuted p value vectors. The default, given by n.perm=0, is not to permute.
pheno.perm
An alternative to specifying n.perm is to supply a matrix of alternative phenotypes, with each column relating to a different permutation.
quiet
set TRUE to suppress the printing of progress dots

Value

If n.perm=0, a vector of p values, one for each SNP (each column in the case and control objects. If n.perm>0, a matrix of p values, each column representing the results of a different permutation. a LIST, use

Examples

Run this code
data(for.exercise,package="snpStats")
case <- snps.10[subject.support$cc==1,]
control <- snps.10[subject.support$cc==0,]
summary(pairtest(case,control))

Run the code above in your browser using DataLab