dlmap.main {dlmap}R Documentation

Perform DLMapping

Description

Fits the iterative algorithm for DLMapping. Reads in data, performs detection and localization stages and outputs summary of selected QTL effects.

Usage

dlmap.asreml(genfile = "dlgenin.dat", phefile = "dlphein.dat", 
mapfile = "dlmapin.dat", phename, baseModel, fixed = NULL, 
random = NULL, rcov = NULL, sparse = NULL, pedigree, 
step = 0, fixpos = 0, seed = 1, n.perm = 0, alpha = 0.05, 
filestem = "dl", estmap=TRUE, ...)

dlmap.lme(genfile="dlgenin.dat", phefile="dlphein.dat", mapfile="dlmapin.dat", 
phename, fixed=NULL, step=0, fixpos=0, seed=1, maxit=60, alpha=.05, 
filestem="dl")

Arguments

genfile File with genotype data. Default filenames are output from dlmap.convert.cross
phefile File with phenotype data. Default filename is output from dlmap.convert.cross
mapfile File with marker position information. Default filename is output from dlmap.convert.cross
phename Response variable name
fixed A formula object specifying the fixed effects part of the base model, with the terms, separated by + operators, on the right of a ~ operator. There is no left side to the ~ expression. If no fixed effect is specified, the model defaults to ~1, i.e. intercept only.
random A formula object specifying the random effects part of the base model, with the terms, separated by + operators, on the right of a ~ operator. See asreml for more detail.
rcov A formula object specifying the error structure of the model, with the terms, separated by + operators, on the right of a ~ operator. See asreml for more detail.
sparse A formula object specifying the fixed effects to be absorbed, with the terms, separated by + operators, on the right of a ~ operator. See asreml for more detail.
baseModel An alternative to specifying fixed, random, sparse, and rcov separately. If a base model has already been fit in asreml-R for the phenotypic variation, this can be input directly
pedigree A pedigree object consisting of three columns. The first column is the individual ID, then the mother's ID and the father's ID. The name of the ID variable in the first column must match the idname variable
step Step size for localization stage, i.e. if step=2, grid of positions spaced 2 cM apart are considered for QTL locations. If step=0 (default) positions are only located at markers.
fixpos Alternative to specifying a step size - if fixpos=2, 2 evenly spaced positions between each marker are considered as QTL locations. If fixpos=0 (default) positions are only located at markers.
seed Random number seed. Default=1
n.perm Number of permutations used to get adjusted p-values at each iteration of detection. If n.perm=0 (default) the Bonferroni correction is used.
alpha Significance level for testing
filestem Stem to add to names of any files generated in DL Mapping process. Default="dl"
estmap Indicator whether to re-estimate the linkage map
maxit Maximum number of iterations to attempt for convergence of lme
... additional arguments to asreml

Details

There are two versions of this function, which use different engines to fit the linear mixed models which form the framework of the algorithm. dlmap.asreml provides a much more general implementation of the DLMapping algorithm and is the preferred method of analysis. dlmap.lme is more restricted in its capabilities, in that it cannot model random effects or covariance structure, cannot handle more than 200 markers, and only allows for a single phenotypic observation per genotype. Also, permutation has not been implemented for this function because it is very slow. However, dlmap.lme will fit the basic algorithm and is useful should a license for ASReml not be available.

In dlmap.asreml, there are two options for specifying the model for phenotypic variation. The individual model components can either be input directly as they would be in an ASReml call, or a previous model (baseModel) output from ASReml can be input and the components will be retrieved from it. The latter formulation may be useful if prior phenotypic modelling has taken place. Note that in either case, variables appearing in the rcov statement must be ordered appropriately in the dataset. For example, if rcov=~ar1(Column):ar1(Row) the data must be sorted as Row within Column.

Missing values in asreml are replaced with zeros, so it is important to centre the covariate in question. This is done for all genotypes within the dlmap.asreml function. Thus individuals with phenotypic but not genotypic data, which play important roles in field trials, may be included safely. For dlmap.lme these individuals cannot be included, so the default behavior is to omit observations with missing values.

It is recommended that no.perm be set to 0 for initial exploratory analysis, as the permutation analysis may be lengthy. The Bonferroni correction is used to adjust for the number of chromosomes under consideration at each detection stage. While this is a conservative measure it seems to perform well in practice.

Two files are output with names set by the argument filestem, which has a default value of "dl". The file "filestem.trace" contains ASReml licensing and likelihood convergence output which otherwise would be dumped to the screen and possibly obscure other messages. Errors, warnings and other messages will still appear on the screen. Some warnings which appear may be passed through from an ASReml call and output on exit. These may generally be ignored. This file is not created if dlmap.lme is used.

The file "filestem.det.log" is a record of iterations in the detection stage. For each iteration the REMLRT testing for genetic variation on each chromosome is output, along with adjusted p-values, genomewide threshold and markers selected as fixed effects. The p-values are corrected for the number of chromosomes tested either by the Bonferroni correction or by permutation. If the number of permutations (n.perm) is greater than 0, then for the Xth iteration an additional file "filestem.permX" will be created which contains the test statistics for the permuted datasets. See the accompanying vignette for an example of how to interpret the ".det.log" file.

Value

zTable Table with one row per QTL detected, columns for which chromosome the QTL is on, its position (cM), flanking markers, additive effect, Z-ratio and p-value.
no.qtl Total number of QTL detected on all chromosomes
final.model Object of class asreml for final model containing all terms in the base model, as well as effects for every QTL detected at the appropriate locations. No random effects for markers are fit
profile If QTL are detected on C chromosomes, this is a list with C elements, each a matrix with 2 rows and a column for each position on the chromosome. The first row contains the cM position; the second row contains the Wald statistic for the model fit in the localization stage
cross rqtl cross object containing genotype data and linkage map
trait name of the response fitted in the model (phename input argument)

Author(s)

Emma Huang and Andrew George

References

Huang, BE and George, AW. Look before you leap: A new approach to QTL mapping. Manuscript in preparation

See Also

dlmap.convert.cross, asreml

Examples

data(BSdat)
data(BSphen)

## Not run: 
# Convert cross object to DL Mapping format
dlmap.convert.cross(format="rqtl", obj=BSdat)

# Analyze data
BSdl <- dlmap.asreml(phename="phenotype", estmap=FALSE, filestem="BS")

# With additional phenotypic data
dlmap.convert.cross(format="rqtl", obj=BSdat, envobj=BSphen, idname="ID")
BSph <- dlmap.asreml(phename="phenotype", env=TRUE, random=~Block, estmap=FALSE)## End(Not run)

[Package dlmap version 1.0 Index]