make.analysis.obj: Set up data for QTL mapping

make.analysis.objR Documentation

Set up data for QTL mapping

Description

Create commonly used objects for the analysis of a backcross or intercross experiment or of recombinant inbred lines.

Usage

make.analysis.obj(data, map.frame, marker.frame, marker.levels=NULL,
method="F2", casewt=NULL,varcov=FALSE,mode.mat=NULL)

Arguments

data

A data.frame (or vector) of phenotype and (optionally) covariate information

map.frame

A map.frame.object (see make.map.frame ) encoding the map information and other details of the study

marker.frame

A marker.frame.object. A matrix or data.frame of marker state information.

marker.levels

A vector of length six or NULL. If NULL then the defaults for the elements are:

Element F2.default BC.default RI.default
1 "AA" "AA" "AA"
2 "Aa" "Aa" "aa"
3 "aa" "nil" "nil"
4 "A-" "nil" "nil"
5 "a-" "nil" "nil"
6 "--" "--" "--"

NA's are allowed in marker.frame as well as the sixth element("--" by default) to denote missing data. To use other coding schemes replace "AA" and "aa" by codes for homozygous states, "Aa" by the code for heterozygotes, "A-" by the code for 'not aa', "a-" by the code for 'not AA', and "--" by the missing code. Positions 3:5 are just placeholders if method!="F2", but must be present.

method

One of "F2", "BC1", "RI.self", or "RI.sib"

casewt

If there are multiple observations on one genotype (such as in recombinant inbreds) this can be used to assign a weight to each observation. The wisdom of doing this is debatable.

varcov

If FALSE, don't create a varcov.object. Otherwise give an index into data to select a dependent variable. See varcov

mode.mat

If NULL use the default. For method=="F2" ( and the default marker.levels of AA, Aa, and aa ), this is a 3 by 2 matrix:

Genotype add dom
AA 1 -1
Aa 0 1
aa -1 -1

For method=="BC1" ( and the default marker.levels of AA and Aa ),it is

Genotype
AA 1
Aa -1

and for RIL methods ( and the default marker.levels of AA and aa ),it is

Genotype
AA 1
aa -1

Other choices of marker.levels will relabel the corresponding rows.

Details

A lot of stuff is bundled together in one object. The function is really just a wrapper calling other make.* functions.

Value

A list with components

data

data.frame of phenotype, covariate information, and regressors created by make.regressor.matrix

varcov

A varcov.object. See make.varcov

reg.names

The names of the regressors from make.regressor.matrix

method

The method argument in the call.

state.matrix

See make.state.matrix

loc.right

See make.loc.right

map.frame

See make.map.frame

casewt

The casewt argument

mode.mat

The mode.mat used

version

A string giving the version of BQTL from qhich the objects was created

call

The function call

Note

This can be quite a LARGE object.It might be better in crosses with lots (say, thousands) of markers, or in which many 'virtual' markers are used, or on computers with limited RAM to store each component separately. Not all components are used in every type of analysis.

Author(s)

Charles C. Berry cberry@ucsd.edu

See Also

make.map.frame for definition of the marker map, The internally used functions are: make.loc.right, make.state.matrix, make.regressor.matrix, make.varcov, and make.marker.numeric

Examples

data( little.bc.pheno )
data( little.mf.5 )
data( little.bc.markers )
names(little.bc.pheno)
little.ana.bc <- make.analysis.obj(little.bc.pheno$bc.phenotype,
                                   little.mf.5,little.bc.markers,
                                   method="BC1")
summary( little.ana.bc )



bqtl documentation built on Sept. 25, 2024, 1:08 a.m.

Related to make.analysis.obj in bqtl...