sim.autoMarkers {polySegratio} | R Documentation |
Simulates dominant markers from an autopolyploid cross
Description
Dominant markers are simulated from an autopolyploid cross given the ploidy level, expected segregation ratios and the proportions in each dosage marker class. This may be chosen from tetraploid to heccaidecaploid and the segregation ratios may be specified explicitly or generated automatically.
Usage
sim.autoMarkers(ploidy.level, dose.proportion, n.markers = 500,
n.individuals = 200, seg.ratios, no.dosage.classes,
type.parents = c("heterogeneous", "homozygous"),
marker.names = paste("M", 1:n.markers, sep = "."),
individual.names = paste("X", 1:n.individuals, sep = "."),
overdispersion=FALSE, shape1=50, seed)
Arguments
ploidy.level |
the number of homologous chromosomes, either as numeric (single value) or as a character string containing type tetraploid, hexaploid, octoploid, ... |
dose.proportion |
the proportion of markers to be simulated in each dosage class. Note that the exact number will be randomly generated from the multinomial distribution |
n.markers |
number of markers (Default: 500) |
n.individuals |
number of individuals in the cross (Default: 200) |
seg.ratios |
numeric vector containing segregation proportion to be supplied if you wish to override automatic calculations using ploidy.level |
no.dosage.classes |
only generate markers for the first
|
type.parents |
heterogeneous for (1,0) or (0,1) homozygous for (1,1) (default: heterogeneous) |
marker.names |
labels for markers (Default: M.1 ... M.n.markers) |
individual.names |
labels for offspring (Default: ... X.j ... ) |
overdispersion |
logical indicating overdispersion (Default: FALSE) |
shape1 |
shape1 parameter(s) for the beta distribution used to generate the Binomial probability p, either of length 1 or no.dosage.classes. Default: 50 which implies very little overdispersion. NB: 'shape2' is calculated from shape 1 and expected segregation ratios |
seed |
integer used to set seed for random number generator (RNG) which (if set) may be used to reproduce results |
Value
Returns an object of class simAutoMarkers
containing
markers |
matrix of 0,1 dominant markers with individuals as cols and rows as markers |
E.segRatio |
expected segregation proportions, list with components
|
type.parents |
heterogeneous for (1,0) or (0,1) homozygous for (1,1) |
dose.proportion |
proportions of markers set for each dosage class |
n.markers |
number of markers (Default: 500) |
n.individuals |
number of individuals in the cross (Default: 200) |
true.doses |
list containing
|
seg.ratios |
object of class segRatio containing segregation ratios |
time.generated |
time/date when data set generated |
seed |
seed for random number generator seed which could be used to reproduce results (I hope) |
overdispersion |
either a list with components 'overdispersion': logical for whether overdispersion is set or not and if TRUE then two extra components 'shape1' and 'shape2' contain parameters for the beta distribution employed to generate Binomial probabilities |
call |
matches arguments when function called |
Note
For use in simulation studies, other parameters such as the true dosage of each marker are also returned. Also, if extra binomial variation or overdispersion is requested then a beta-binomial distribution is employed to simulate marker data.Note that as the 'shape1' parameter becomes larger, the resulting marker data are less overdispersed.
Author(s)
Peter Baker p.baker1@uq.edu.au
See Also
simAutoMarkers
,
print.simAutoMarkers
,
plot.simAutoMarkers
,
segRatio
Examples
## generate autopolyploid markers
a1 <- sim.autoMarkers(4,c(0.8,0.2),n.markers=20,n.individuals=10)
print(a1)
a2 <-
sim.autoMarkers(8,c(0.7,0.2,0.09,0.01),type.parents="homo",n.markers=20,n.individuals=10)
print(a2)