\name{haplo.score.slide.w} \alias{haplo.score.slide.w} %- Also NEED an '\alias' for EACH other topic documented here. \title{Wrapper for haplo.score.slide in haplo.stats package, which is used to identify sub-haplotypes from a group of loci} \description{ Wrapper for \code{\link[haplo.stats]{haplo.score.slide}}, which is used to identify sub-haplotypes from a group of loci. Run haplo.score on all contiguous subsets of size n.slide from the loci in a genotype matrix (geno). From each call to haplo.score, report the global score statistic p-value. Can also report global and maximum score statistics simulated p-values. } \usage{ haplo.score.slide.w(geneSetObj, trait.type = "gaussian", n.slide = 2, offset = NA, x.adj = NA, skip.haplo = 5/(2 * nrow(geno)), locus.label = NA, miss.val = c(0, NA), simulate = FALSE, sim.control = score.sim.control(), em.control = haplo.em.control()) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{geneSetObj}{ A geneSet object} \item{trait.type}{ Character string defining type of trait, with values of \dQuote{gaussian}, \dQuote{binomial}, \dQuote{poisson}, \dQuote{ordinal}.} \item{n.slide}{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 \code{n.slide}+1 and so on. If the total number of loci in geno is \code{n.loci}, then there are \code{n.loci} - \code{n.slide} + 1 total subsets. } \item{offset}{ Vector of offset when trait.type = \dQuote{poisson}} \item{x.adj}{ Matrix of non-genetic covariates used to adjust the score statistics. Note that intercept should not be included, as it will be added in this function. } \item{skip.haplo}{ Skip score statistics for haplotypes with frequencies < \code{skip.haplo}. The default is for an expected count of 5 out of the 2*N haplotype occurrences.} \item{locus.label}{Vector of labels for loci.} \item{miss.val}{Vector of values that represent missing alleles in geno.} \item{simulate}{ Logical: if [F]alse, no empirical p-values are computed; if [T]rue, simulations are performed. Specific simulation parameters can be controlled in the sim.control parameter list. } \item{sim.control}{ list of control parameters to determine how simulations are performed for simulated p-values. The list is created by the function \code{\link[haplo.stats]{score.sim.control}} and the default values of this function can be changed as desired. See \code{\link[haplo.stats]{score.sim.control}} for details.} \item{em.control}{ A list of control parameters to determine how to perform the EM algorithm for estimating haplotype frequencies when phase is unknown. The list is created by the function \code{\link[haplo.stats]{haplo.em.control}} - see this function for more details} } \details{ Please refer to \code{\link[haplo.stats]{haplo.score.slide}} for more details. } \value{ List with the following components: \item{df}{ Data frame with start locus, global p-value, simulated global p-value, and simulated maximum-score p-value. } \item{n.loci}{ Number of loci given in the genotype matrix. } \item{simulate}{ Same as parameter description above. } \item{n.slide}{ Same as parameter description above. } \item{locus.label}{ Same as parameter description above. } \item{n.val.haplo}{ Vector containing the number of valid simulations used in the maximum-score statistic p-value simulation. The number of valid simulations can be less than the number of simulations requested (by sim.control) if simulated data sets produce unstable variables of the score statistics. } \item{n.val.global}{ Vector containing the number of valid simulations used in the global score statistic p-value simulation. } } \references{ ~put references to the literature/web site here ~ } \author{ Weiliang Qiu \email{stwxq@channing.harvard.edu}, Ross Lazarus \email{ross.lazarus@channing.harvard.edu}} \note{ ~~further notes~~ } \seealso{ \code{\link{haplo.em.w}}, \code{\link{haplo.scan.w}}, \code{\link{haplo.score.w}}} \examples{ ##---- Should be DIRECTLY executable !! ---- ##-- ==> Define data, use random, ##-- or do help(data=index) for the standard data sets. ## The function is currently defined as "haplo.score.slide.w" } \keyword{ misc }% at least one, from doc/KEYWORDS