Learn R Programming

GenABEL (version 1.8-0)

scan.haplo: scan.haplo

Description

Runs haplo.score.slide from the package haplo.stats and represents output as scan.gwaa-class data object

Usage

scan.haplo(formula, data, snpsubset, idsubset, n.slide = 2, bcast = 10, simulate=FALSE, trait.type, ...)

Arguments

formula
Formula to be used in analysis. It should be a character string following standard notation. On the left-had side, there should be outcome. On the right-hand side, covariates are liste, with "+" separating the covariates (additive action). The left- and right-hand sides are separated by "~". You should put CRSNP argument in the formula. For example "qt3~CRSNP" would analyse asociation between SNPs and trait "qt3", without any adjustment. To adjust for age and sex, use "qt3~age+sex+CRSNP". Currently, only additive effects ("+") are allowed.
data
object of calss gwaa.data-class
snpsubset
Index, character or logical vector with subset of SNPs to run analysis on. If missing, all SNPs from data are used for analysis.
idsubset
Index, character or logical vector with subset of IDs to run analysis on. If missing, all people from data/cc are used for analysis.
n.slide
Default = 2. Number of loci in each contiguous subset. The first subset is the ordered loci numbered 1 to n.slide, the second subset is 2 through n.slide+1 and so on. If the total number of loci in geno is n.loci, then there are n.loci - n.slide + 1 total subsets.
bcast
show progress every bcast SNPs
simulate
if simulated P-values should be generated
trait.type
Character string defining type of trait, with values of "gaussian", "binomial", "poisson", "ordinal" (see help for haplo.score.slide for details). If not specified, the routine picks up "gaussian" or "binomial" (two levels of trait).
...
other arguments to be passed to haplo.score.slide

Value

Object of class scan.gwaa-class

Details

List element P2df is set equal to P1df, as only allelic results are returned. This has nothing to do with degrees of freedom.

References

For haplo.stats (scan.haplo, scan.haplo.2D), please cite:

Schaid DJ, Rowland CM, Tines DE, Jacobson RM, Poland GA. (2002) Score tests for association between traits and haplotypes when linkage phase is ambiguous. Am J Hum Genet, 70: 425-434.

See Also

scan.gwaa-class, haplo.score.slide

Examples

Run this code
require(GenABEL.data)
data(srdta)
a <- ccfast("bt",srdta,snps=(717:733),ids=(srdta@phdata$age<40))
plot(a)
if (require(haplo.stats)) {
b <- scan.haplo("bt~sex+CRSNP",srdta,snps=(717:733),
		ids=(srdta@phdata$age<40))
c <- scan.haplo("bt~sex+CRSNP",srdta,snps=(717:733),
		ids=(srdta@phdata$age<40),n.slide=3)
add.plot(b,col="red",type="l")
add.plot(c,col="darkgreen",type="l")
}

Run the code above in your browser using DataLab