View source: R/metagene-class.R
read.metagene | R Documentation |
A basic interface to the metagene simulator.
This function returns the data frame with the pedigree and phenotypes of the simulated individuals.
read.metagene(fname)
## S3 method for class 'metagene'
summary(object, ...)
## S3 method for class 'summary.metagene'
print(x, ...)
## S3 method for class 'metagene'
plot(x, type = c("default", "spatial"), ...)
## S3 method for class 'metagene'
get_ntraits(x, ...)
## S3 method for class 'metagene'
ngenerations(x, ...)
## S3 method for class 'metagene'
nindividuals(x, exclude.founders = FALSE, ...)
## S3 method for class 'metagene'
as.data.frame(x, ..., exclude.founders = TRUE)
fname |
file name of the second metagene output file (usually: insim.002) |
object |
a metagene object |
... |
not used |
x |
a metagene object |
type |
character. If 'default', the empirical density of the breeding and phenotypic values will be represented by generation. If 'spatial', the map of the spatial component will be plotted. |
exclude.founders |
logical: should the data.frame contain the genetic values of the founders? |
Read the output file (the one with the pedigree. Usually: insim.002) of the Metagene program, and build an object of class metagene.
the data in the file as an object of class metagene
returns a data frame with one row per individual, with the spatial coordinates if applicable, the pedigree information, the generation, the true breeding value, the phenotype, the sex, the spatially structured component of the phenotype and other internal metagene variables.
summary(metagene)
: summary of a metagene object
print(summary.metagene)
: print summary method
plot(metagene)
: plots either genetic and phenotypic values, or the
spatial component of the phenotype. Pass further
ggplot
layers in ...
get_ntraits(metagene)
: gets the number of traits
ngenerations(metagene)
: gets the number of generations
nindividuals(metagene)
: gets the number of individuals
as.data.frame(metagene)
: Coerce to a data.frame
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.