dlcross {dlmap}R Documentation

Constructor function for dlcross format

Description

Reads in files from all formats supported by read.cross and converts them to dlmap input format. Also supports other formats for objects

Usage

dlcross(format = c("csv", "csvr", "csvs", "csvsr", "mm", "qtx", 
"qtlcart", "gary", "karl", "rqtl", "dlmap", "other"), genobj, pheobj, 
mapobj, idname="ID", dir = "", file, genfile, mapfile, phefile, 
chridfile, mnamesfile, pnamesfile, na.strings = c("-", "NA"),
genotypes = c("A", "H", "B", "D", "C"), alleles = c("A", "B"), type, step=0,
fixpos=0, estmap=TRUE, ...)

Arguments

format See documentation for read.cross. Also supports the input of an object of class cross ("rqtl" format), "dlmap" format (described below) and continuous data for association mapping populations ("other" format)
genobj if format="rqtl", object of class cross; if format="dlmap" or "other" data frame containing genotypes
pheobj Data frame or matrix containing supplementary phenotypic or environmental data
mapobj if format="other" or "dlmap", 2/3-columned data-frame containing marker names, chromosomes and marker positions
idname Unique identifier variable name; will be used to match phenotypic and marker data
dir Directory where input files are located; default is working directory
file see read.cross
genfile see read.cross; if format="dlmap" see below
mapfile see read.cross; if format="dlmap" see below
phefile see read.cross; if format="dlmap" see below
chridfile see read.cross
mnamesfile see read.cross
pnamesfile see read.cross
na.strings see read.cross
genotypes see read.cross
alleles see read.cross
type Type of experimental cross; only necessary if format="dlmap" or "other"; if not input, will be assumed that data is from unrelated individuals
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.
estmap Flag for whether to re-estimate the linkage map. Cannot be done for format="other"
... additional arguments to read.cross

Details

This function constructs dlcross objects for input into dlmap.asreml or dlmap.lme. The format argument allows for a wide range of input data formats, including all those compatible with read.cross. In addition, format="dlmap" takes three files or objects in the following form.

If a single set of trait values is available for each genotype, then phenotypic data will be input through the arguments genobj, file, or phefile (depending on the file format). The argument pheobj allows for input of phenotypic data on replicates or additional individuals which are not necessarily genotyped.

Choosing format="other" allows for association mapping populations to be analyzed, and in this case the data can be input as with format="dlmap", but a genetic linkage map is not required. Hence the mapfile only needs the first two columns of marker names and chromosome groupings.

Value

Object with class "dlcross" which can be input to dlmap.asreml or dlmap.lme. Contains the following elements:

dfMerged Data frame to be used in dlMapping analysis
map Original genetic map
nphe Number of phenotypic traits
loc A flag for whether to run the localization stage
idname the ID name input to the function
mapp If format is not "other", genetic map augmented by imputed genotypes at grid of positions
genCross if format is not "other", rqtl cross object. CAUTION: if there are replicates, i.e., more phenotypic data than genotypic, this object will not contain all of the phenotypic data for the sample

Author(s)

Emma Huang and Andrew George

References

Huang, BE and George, AW. 2009. Look before you leap: A new approach to QTL mapping. TAG 119:899-911

See Also

summary.dlcross, plot.dlcross

Examples

# load dataset
data(BSdat)
data(BSphe)

# convert data to dlmap format
dl.in1 <- dlcross(format="rqtl", genobj=BSdat, idname="ID", fixpos=1)

# convert data with separate phenotypic trait file
dl.in2 <- dlcross(format="rqtl", genobj=BSdat, pheobj=BSphe, idname="ID", step=5)

[Package dlmap version 1.06 Index]