| read.cross.karl {qtl} | R Documentation |
Data for a QTL experiment is read from a set of files and converted
into an object of class cross.
read.cross.karl(dir,genfile,mapfile,phefile)
dir |
Character string specifying the directory containing the input files. |
genfile |
File containing a (n.ind x n.mar) matrix of genotypes, coded 1/2/3/4/5/0 for AA/AB/BB/not BB/not AA/missing, one individual per line. |
phefile |
File containing a (n.ind x n.phe) matrix of phenotypes (one individual per line) with "-" denoting missing. The first line in the file should give the phenotype names. |
mapfile |
File containing the map information, in the following
format n.chrn.mar(1) rf(1,1) rf(1,2) ... rf(1,n.mar(1)-1)mar.name(1,1)mar.name(1,2)...mar.name(1,n.mar(1))n.mar(2)...etc. |
We use the marker names to infer the chromosome names (assuming that most marker names are like D1M120 or D19M99); if the markers look like DXM*, we assume it is the X chromosome. If all genotypes are <= 2, we assume it is a backcross, otherwise it is assumed to be an intercross. We weren't thinking about 4-way crosses, and so this format doesn't work for that type of cross.
An object of class cross. See read.cross for details.
Karl W Broman,
kbroman@jhsph.edu
http://biosun01.biostat.jhsph.edu/~kbroman/software/qtl.html
read.cross,
read.cross.mm, read.cross.gary,
read.cross.csv
cross2 <- read.cross("karl",dir="Data", genfile="gen.txt",
phefile="phe.txt", mapfile="map.txt")