EVOLUTION-MANAGER
Edit File: write.cross.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Write data for a QTL experiment to a file</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for write.cross {qtl}"><tr><td>write.cross {qtl}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Write data for a QTL experiment to a file</h2> <h3>Description</h3> <p>Data for a QTL experiment is written to a file (or files). </p> <h3>Usage</h3> <pre> write.cross(cross, format=c("csv", "csvr", "csvs", "csvsr", "mm", "qtlcart", "gary", "qtab", "mapqtl", "tidy"), filestem="data", chr, digits=NULL, descr) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>cross</code></td> <td> <p>An object of class <code>cross</code>. See <code><a href="read.cross.html">read.cross</a></code> for details.</p> </td></tr> <tr valign="top"><td><code>format</code></td> <td> <p>Specifies whether to write the data in comma-delimited, rotated comma-delimited, Mapmaker, QTL Cartographer, Gary Churchill's, QTAB, MapQTL format.</p> </td></tr> <tr valign="top"><td><code>filestem</code></td> <td> <p>A character string giving the first part of the output file names (the bit before the dot). In Windows, use forward slashes (<code>"/"</code>) or double backslashes (<code>"\\"</code>) to specify directory trees.</p> </td></tr> <tr valign="top"><td><code>chr</code></td> <td> <p>A vector specifying for which chromosomes genotype data should be written. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding <code>-</code> to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.</p> </td></tr> <tr valign="top"><td><code>digits</code></td> <td> <p>Number of digits to which phenotype values and genetic map positions should be rounded. If NULL (the default), they are not rounded.</p> </td></tr> <tr valign="top"><td><code>descr</code></td> <td> <p>Character string description; used only with <code>format="qtab"</code>.</p> </td></tr> </table> <h3>Details</h3> <p>Comma-delimited formats: a single csv file is created in the formats <code>"csv"</code> or <code>"csvr"</code>. Two files are created (one for the genotype data and one for the phenotype data) for the formats <code>"csvs"</code> and <code>"csvsr"</code>; if <code>filestem="file"</code>, the two files will be names <code>"file_gen.csv"</code> and <code>"file_phe.csv"</code>. See the help file for <code><a href="read.cross.html">read.cross</a></code> for details on these formats. </p> <p>Mapmaker format: Data is written to two files. Suppose <code>filestem="file"</code>. Then <code>"file.raw"</code> will contain the genotype and phenotype data, and <code>"file.prep"</code> will contain the necessary code for defining the chromosome assignments, marker order, and inter-marker distances. </p> <p>QTL Cartographer format: Data is written to two files. Suppose <code>filestem="file"</code>. Then <code>"file.cro"</code> will contain the genotype and phenotype data, and <code>"file.map"</code> 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. </p> <p>Gary's format: Data is written to six files. They are: <br /> <code>"geno.data"</code> - genotype data; <br /> <code>"pheno.data"</code> - phenotype data; <br /> <code>"chrid.dat"</code> - the chromosome identifier for each marker; <br /> <code>"mnames.txt"</code> - the marker names; <br /> <code>"markerpos.txt"</code> - the marker positions; <br /> <code>"pnames.txt"</code> - the phenotype names </p> <p>QTAB format: See <a href="https://github.com/qtlHD/qtlHD/blob/master/doc/input/qtab.md">documentation</a>. </p> <p>MapQTL format: See <a href="https://www.kyazma.nl/docs/MQ7Manual.pdf">documentation</a>. </p> <p>Tidy format: Data is written to three files, <code>"stem_gen.csv"</code>, <code>"stem_phe.csv"</code>, and <code>"stem_map.csv"</code> (where <code>stem</code> is taken from the <code>filestem</code> argument. </p> <h3>Author(s)</h3> <p>Karl W Broman, <a href="mailto:broman@wisc.edu">broman@wisc.edu</a>; Hao Wu; Brian S. Yandell; Danny Arends; Aaron Wolen</p> <h3>See Also</h3> <p><code><a href="read.cross.html">read.cross</a></code> </p> <h3>Examples</h3> <pre> ## Not run: data(fake.bc) # comma-delimited format write.cross(fake.bc, "csv", "Data/fakebc", c(1,5,13)) # rotated comma-delimited format write.cross(fake.bc, "csvr", "Data/fakebc", c(1,5,13)) # split comma-delimited format write.cross(fake.bc, "csvs", "Data/fakebc", c(1,5,13)) # split and rotated comma-delimited format write.cross(fake.bc, "csvsr", "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)) ## End(Not run) </pre> <hr /><div style="text-align: center;">[Package <em>qtl</em> version 1.66 <a href="00Index.html">Index</a>]</div> </body></html>