Learn R Programming

qtl (version 1.01-9)

write.cross: Write data for a QTL experiment to a file

Description

Data for a QTL experiment is written to a file (or files).

Usage

write.cross(cross, format=c("csv","mm","qtlcart","gary"),
            filestem="data", chr, digits=5)

Arguments

cross
An object of class cross. See read.cross for details.
format
Specifies whether to write the data in comma-delimited, Mapmaker, QTL Cartographer, or Gary Churchill's format.
filestem
A character string giving the first part of the output file names (the bit before the dot). In Windows, use forward slashes ("/") or double backslashes ("\\") to specify directory trees.
chr
A vector specifying for which chromosomes genotype data should be written.
digits
Number of digits to which phenotype values should be rounded.

Details

Comma-delimited format: a single csv file is created in the format read by read.cross.

Mapmaker format: Data is written to two files. Suppose filestem="file". Then "file.raw" will contain the genotype and phenotype data, and "file.prep" will contain the necessary code for defining the chromosome assignments, marker order, and inter-marker distances.

QTL Cartographer format: Data is written to two files. Suppose filestem="file". Then "file.cro" will contain the genotype and phenotype data, and "file.map" will contain the genetic map information. Note that cross types are converted to QTL Cartographer cross types as follows: riself to RF1, risib to RF2, bc to B1 and f2 to RF2.

Gary's format: Data is written to six files. They are: "geno.data" - genotype data; "pheno.data" - phenotype data; "chrid.dat" - the chromosome identifier for each marker; "mnames.txt" - the marker names; "markerpos.txt" - the marker positions; "pnames.txt" - the phenotype names

See Also

read.cross

Examples

Run this code
data(fake.bc)

# comma-delimited format
write.cross(fake.bc, "csv", "Data/fakebc", c(1,5,13))

# Mapmaker format
write.cross(fake.bc, "mm", "Data/fakebc", c(1,5,13))

# QTL Cartographer format
write.cross(fake.bc, "qtlcart", "Data/fakebc", c(1,5,13))

# Gary's format
write.cross(fake.bc, "gary", c(1,5,13))

Run the code above in your browser using DataLab