drawLocCrossovers | R Documentation |
Draw the number and location of crossing-overs per gamete, in terms of SNP indices and not physical coordinates.
drawLocCrossovers(
crosses,
nb.snps,
lambda = 2,
simplistic = FALSE,
verbose = 0
)
crosses |
data.frame with three columns, parent1, parent2, child; if parent 1 and 2 are the same, it will be an autofecondation; if parent2 is NA, it will be a haplodiploidization |
nb.snps |
vector with the nb of SNPs per chromosome, which names are chromosome names |
lambda |
mean number of crossing-overs (parameter of a Poisson) |
simplistic |
if TRUE, the value of |
verbose |
verbosity level (0/1) |
list of lists (one per cross, then one per parent, then one per chromosome) whose names are crosses$child, in the same order
Timothee Flutre
makeGameteSingleIndSingleChrom
## Not run: ## make inputs
nb.offs <- 100
names.offs <- paste0("par1-par2-",
sprintf(fmt=paste0("%0", floor(log10(nb.offs))+1, "i"),
1:nb.offs))
crosses <- data.frame(parent1=rep("par1", nb.offs),
parent2=rep("par2", nb.offs),
child=names.offs,
stringsAsFactors=FALSE)
## draw locations of crossing-overs
loc.crossovers <- drawLocCrossovers(crosses=crosses,
nb.snps=setNames(c(2739, 2811),
c("chr1", "chr2")),
verbose=1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.