specie | R Documentation |
Specie object store specific information of one specie.
nChr
[numeric] Number of chromosomes
lChr
[numeric] Length of all chromosomes
specName
[str] Specie's name
ploidy
[numeric] Number of possible alleles at one locus
mutRate
[numeric] Mutation rate at each base
recombRate
[numeric] Recombination rate at each base
chrNames
[str] Names of the chromosomes
nLoci
[numeric] Number of loci (including both markers (SNPs) & QTLs)
effPopSize
[numeric] Effective population size
recombRateOneVal
[logical] Assume same recombination rate across genome
simInfo
[simInfo class] Simulation information (see:simInfo)
new()
Create a new specie object.
specie$new( nChr, lChr, specName = "Undefinded", ploidy = NA, mutRate = NA, recombRate = NA, chrNames = NA, nLoci = NA, effPopSize = NA, recombRateOneVal = TRUE, simInfo = NULL, verbose = TRUE )
nChr
[numeric] Number of chromosomes
lChr
[numeric] length of all chromosomes
specName
[str] Specie's name (optional)
ploidy
[numeric] Number of possible alleles at one locus (optional)
mutRate
[numeric] Mutation rate at each base (optional)
recombRate
[numeric] Recombination rate at each base (optional)
chrNames
[str] Names of the chromosomes (optional)
nLoci
[numeric] Number of loci (including both markers (SNPs) & QTLs)
effPopSize
[numeric] Effective population size
recombRateOneVal
[logical] Assume same recombination rate across genome or not
simInfo
[simInfo class] Simulation information (see:simInfo)
verbose
[logical] Display info (optional)
A new 'specie' object.
### create simulation information mySimInfo <- simInfo$new(simName = "Simulation Example", simGeno = TRUE, simPheno = TRUE, nSimGeno = 1, nSimPheno = 3, nCoreMax = 4, nCorePerGeno = 1, nCorePerPheno = 3, saveDataFileName = NULL) ### create specie information mySpec <- specie$new(nChr = 3, lChr = c(100, 150, 200), specName = "Example 1", ploidy = 2, mutRate = 10^-8, recombRate = 10^-7, recombRateOneVal = FALSE, chrNames = c("C1", "C2", "C3"), nLoci = 100, effPopSize = 100, simInfo = mySimInfo, verbose = TRUE) print(mySpec)
print()
Display information about the object
specie$print()
getChrLength()
Get the chromosomes length
specie$getChrLength(chr = NA)
chr
[str or numeric] chromosome ids
mySpec$getChrLength() mySpec$getChrLength(2) mySpec$getChrLength("Chr3")
clone()
The objects of this class are cloneable with this method.
specie$clone(deep = FALSE)
deep
Whether to make a deep clone.
## ------------------------------------------------
## Method `specie$new`
## ------------------------------------------------
### create simulation information
mySimInfo <- simInfo$new(simName = "Simulation Example",
simGeno = TRUE,
simPheno = TRUE,
nSimGeno = 1,
nSimPheno = 3,
nCoreMax = 4,
nCorePerGeno = 1,
nCorePerPheno = 3,
saveDataFileName = NULL)
### create specie information
mySpec <- specie$new(nChr = 3,
lChr = c(100, 150, 200),
specName = "Example 1",
ploidy = 2,
mutRate = 10^-8,
recombRate = 10^-7,
recombRateOneVal = FALSE,
chrNames = c("C1", "C2", "C3"),
nLoci = 100,
effPopSize = 100,
simInfo = mySimInfo,
verbose = TRUE)
print(mySpec)
## ------------------------------------------------
## Method `specie$getChrLength`
## ------------------------------------------------
mySpec$getChrLength()
mySpec$getChrLength(2)
mySpec$getChrLength("Chr3")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.