locus {bqtl}R Documentation

Lookup loci or effects for genetic model formulas

Description

Convert numeric indexes to names of regressors for a genetic model. One or many genetic models can be specified through the use of this function. It is used on the right hand side of a formula in the bqtl function.

Usage

locus(x, ..., scope, method, chromo, cM, ana.obj)
add(x, ..., scope, method)
dom(x, ..., scope, method)

Arguments

x

Typically an integer, an integer vector, or an array whose elements are integers. These index loci described in a map.frame object.

However, x can also be a character string, vector, et cetera, in which case the elements must belong to names(scope).

...

Optional arguments (usually integers) to be used when is.atomic(x) is TRUE.

chromo

A chromosome number or 2 ordered numbers. The loci on the chromosome or in the range of chromosome numbers are used. If chromo is used, x must not be used.

cM

(Optional) map distance or two giving a location near a locus or range of locations from which loci will be included. If the one chromosome number is specified in chromo, cM must be ordered. If cM is omitted, all loci on the chromosome(s) will be included.

scope

(Optional and) Usually not supplied by the user. Rather bqtl fills this in automatically. A vector of regressor names, like the reg.names component returned by make.analysis.obj.

method

(Optional and) Usually not supplied by the user. Like scope, bqtl takes care of filling this in with "BC1", "F2", et cetera as appropriate.

ana.obj

Usually not specified by the user. This is the analysis.object to be used to lookup loci if a chromo argument is used.

Details

locus is used in the model formula notation of bqtl, possibly more than once, and possibly with regressors named in the usual manner. locus is intended to speed up the specification and examination of genetic models by allowing many models to be specified in a shorthand notation in a single model formula. The names of genetic loci can consist of marker names, names that encode chromosome number and location, or other shorthand notations. The names of terms in genetic models will typically include the names of the locus and may prepend "add." or "dom." or similar abbreviations for the 'additive' and 'dominance' terms associated with the locus.

When used as in bqtl( y ~ locus(34), my.analysis.obj ), it will look up the term or terms corresponding to the 34th locus. When this is passed back to bqtl, it is pasted into a text string that will become a formula and is subsequently processed to yield the fit for a one gene model.

When used as in bqtl( y ~ locus(34,75,172), my.analysis.obj) it looks up each term and returns a result to bqtl that results in fitting a 3 gene model (without interaction terms).

When x is a vector or array, the processing typically returns pieces character strings for many model formulas. bqtl(y ~ locus(26:75), ...) results in a list of 50 different one gene model fits from bqtl for the terms corresponding to the 26th through the 75th variables. bqtl(y ~ locus(cbind(c(15,45,192),c(16,46,193))),...) returns two three gene models. And more generally, whenever is.array(x) is TRUE, the columns (or slices) specify dim(x)[1]/length(x) different models.

The chromo argument performs a lookup of loci on the chromosome via the function map.index. If cM is also given, the locus nearest that location is used. If two values are given for cM all loci in the range are used.

add(x) and dom(x) are alternatives that specify that only the additive or dominance terms in an F2 intercross.

Value

A character vector whose element(s) can be parsed as the right hand side of a model formula(s).

Author(s)

Charles C. Berry cberry@ucsd.edu

See Also

configs, bqtl, and the examples there for a sense of how to use locus, make.analysis.obj for the setup that encodes the marker map and the marker information.


[Package bqtl version 1.0-36 Index]