dlmap.convert.cross {dlmap} | R Documentation |
Reads in files from all formats supported by read.cross
and converts them to dlmap input format. Creates dlmap input files in working directory.
dlmap.convert.cross(format = c("csv", "csvr", "csvs", "csvsr", "mm", "qtx", "qtlcart", "gary", "karl", "rqtl"), obj, pheobj, idname="ID", dir = "", genoutfile = "dlgenin.dat", pheoutfile = "dlphein.dat", mapoutfile = "dlmapin.dat", file, genfile, mapfile, phefile, chridfile, mnamesfile, pnamesfile, na.strings = c("-", "NA"), genotypes = c("A", "H", "B", "D", "C"), alleles = c("A", "B"), ...)
format |
See documentation for read.cross . Also supports the
input of an object of class cross ("rqtl" format) |
obj |
if format="rqtl", object of class cross |
pheobj |
Data frame or matrix containing supplementary spatial/environmental data |
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 |
genoutfile |
File with genotype data output in dlmap input format |
pheoutfile |
File with phenotype data output in dlmap input format |
mapoutfile |
File with marker position information output in dlmap input format |
file |
see read.cross |
genfile |
see read.cross |
mapfile |
see read.cross |
phefile |
see read.cross |
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 |
... |
additional arguments to read.cross |
Use of this function will allow automatic input into dlmap.asreml
or
dlmap.lme
. Otherwise input files will need to be constructed by hand.
See below for the format if constructing input manually.
If a single set of trait values is available for each genotype, then
phenotypic data will be input through the arguments obj
, file
,
or phefile
(depending on the file format).
The argument envobj
allows for input of phenotypic data on replicates
or additional individuals which are not necessarily genotyped.
Nothing returned. Three files output into names specified by
genoutfile
, pheoutfile
and mapoutfile
(or default values of "dlgenin.dat", "dlphein.dat", "dlmapin.dat" if
these arguments are missing).
Notation:
n.gen | is the number of genotyped individuals | |
n.ind | is the number of phenotyped individuals | |
n.obs | is the number of phenotypic observations (for a single trait) | |
M | is the number of markers | |
P | is the number of phenotypes | |
C | is the number of chromosomes |
genoutfile
has a header row with the name of the
unique identifier variable and the marker names. This is followed by
n.gen rows containing the identifier and genotypes for each individual. ID | mrk1 | ... | mrkM |
1 | 1 | ... | 1 |
... | ... | ||
n.gen | 0 | ... | 1 |
pheoutfile
has a header row with the name of the
unique identifier variable and the phenotype names. This is followed by
n.obs rows containing the identifier and phenotypes for each sample.
If envobj
is not input, the number of rows in this file will correspond
to the number of rows in genoutfile
. ID | phename1 | ... | phenameP |
1 | 3.7 | ... | 2.4 |
... | ... | ||
n.ind | 5.1 | ... | 8.2 |
mapoutfile
has a header row with the labels shown
below for the marker ID, chromosome and position in cM. The third column can
be omitted, in which case the marker positions will be estimated from the data.
Note: the marker names must be in the same order as in the genotype data file. MrkID | Chr | Pos |
mrk1 | 1 | 0.00 |
... | ||
mrkM | C | 100.0 |
Emma Huang and Andrew George
Huang, BE and George, AW. Look before you leap: A new approach to QTL mapping. Manuscript in preparation
# load dataset data(BSdat) data(BSphen) ## Not run: # convert data to dlmap format dlmap.convert.cross(format="rqtl", obj=BSdat) # convert data with separate phenotypic trait file dlmap.convert.cross(format="rqtl", obj=BSdat, envobj=BSphen, idname="ID") ## End(Not run)