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.
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)
the number of homologous chromosomes, either as numeric (single value) or as a character string containing type tetraploid, hexaploid, octoploid, …
the proportion of markers to be simulated in each dosage class. Note that the exact number will be randomly generated from the multinomial distribution
number of markers (Default: 500)
number of individuals in the cross (Default: 200)
numeric vector containing segregation proportion to be supplied if you wish to override automatic calculations using ploidy.level
only generate markers for the first
no.dosage.classes
classes (if set)
heterogeneous for (1,0) or (0,1) homozygous for (1,1) (default: heterogeneous)
labels for markers (Default: M.1 … M.n.markers)
labels for offspring (Default: … X.j … )
logical indicating overdispersion (Default: FALSE)
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
integer used to set seed for random number generator (RNG) which (if set) may be used to reproduce results
Returns an object of class simAutoMarkers
containing
matrix of 0,1 dominant markers with individuals as cols and rows as markers
expected segregation proportions, list with components
ratio
segregation proportions,
ploidy.level
level of ploidy 4,6,8, …
ploidy.name
tetraploid, … , unknown
heterogeneous for (1,0) or (0,1) homozygous for (1,1)
proportions of markers set for each dosage class
number of markers (Default: 500)
number of individuals in the cross (Default: 200)
list containing
dosage
doses generated for each marker for simulation
table.dosages
summary of no.s in each dosage
names
names for each dosage such as SD (single dose),
DD (double dose), SDxSD etc
object of class segRatio containing segregation ratios
time/date when data set generated
seed for random number generator seed which could be used to reproduce results (I hope)
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
matches arguments when function called
simAutoMarkers
,
print.simAutoMarkers
,
plot.simAutoMarkers
,
segRatio
# NOT RUN {
## 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)
# }
Run the code above in your browser using DataLab