Convert an STA object to a cross object from package qtl. Genotypic
information should be available in a .csv file.
The only way to create an object of class cross is by importing both the
phenotypic and the genotypic data from external files. Therefore the
phenotypic data, either the BLUEs or the BLUPs from the fitted model are
first written to a temporary file. The genotypic data has to be available in
a .csv file in the correct format as well, see genoFile
for a
description of this format. These phenotypic and genotypic files are then
imported into a cross object using the read.cross function in the qtl
package.
Arguments
- STA
An object of class
STA
.- trial
A character string indicating the trial to be exported. If
NULL
andSTA
contains only one trial, that trial is exported.- traits
A character string containing the traits to be exported. If
NULL
, all traits for the selected trial are exported.- what
A character string containing the statistics to be exported as phenotype in the cross object. This can be either
BLUEs
orBLUPs
.- genoFile
A character string indicating a filename containing phenotypic data. The data should be in the format required by the qtl package. The first column should contain the individuals, starting from row 4. The following columns contain markers with in the second and third row the chromosome and position on the chromosome and in the following rows the genotypes.
- genotypes
A character vector specifying the genotype codes corresponding to AA, AB, BB, not BB and not AA.
- ...
Further arguments to be passed to the read.cross function. See
read.cross
.
See also
Other functions for STA objects:
STAtoTD()
,
plot.STA()
,
report.STA()
,
summary.STA()
Examples
## Fit model using SpATS.
modSp <- fitTD(TD = TDHeat05,
design = "res.rowcol",
traits = "yield",
what = "fixed")
#> Using SpATS for fitting models.
## Create cross object with BLUEs from modSp using genotypic information
## from markers.csv in the package.
cross <- STAtoCross(modSp,
genoFile = system.file("extdata", "markers.csv",
package = "statgenSTA"))