| read.cross.csv {qtl} | R Documentation |
Data for a QTL experiment is read from a file and converted
into an object of class cross.
read.cross.csv(dir,file,sep=",",na.strings="-",genotypes=c("A","H","B","C","D"))
dir |
Character string specifying the directory containing the input files. |
file |
A comma-delimited file containing all of the data, in a
very rigid format. The first line should contain the phenotype
names followed by the marker names. The next line should contain
blanks in the phenotype columns, followed by chromosome identifiers
for each marker in all other columns. (Note: if a chromosome
has the identifier "X" or "x", it is assumed to be the
X chromosome.) The third line should contain blanks in the
phenotype columns, followed by marker positions, in cM. Subsequent
lines should give the phenotype data followed by the genotype data,
with one line for each individual. |
sep |
The field separator. This is generally ",", but
could be any other character, as long as that character does not
appear in any of the records. |
na.strings |
A vector of strings which are to be interpreted as missing values. These are interpreted globally for the entire file, so missing value codes in phenotypes must not be valid genotypes, and vice versa. |
genotypes |
A vector of character strings specifying the genotype
codes used in the file. Generally this is a vector of length 5,
with the elements corresponding to AA, AB, BB, not AA (i.e., AB or
BB), and not BB (ie, AB or BB). Note: Pay careful attention
to the third and fourth of these; the order of these can be
confusing! These five character strings are converted to
(1,2,3,5,4) in the cross object that is returned. |
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.karl,
read.cross.mm,
read.cross.csv
cross <- read.cross("csv",dir="../Data",file="dataset.csv")