genoProb | R Documentation |
Calculate the probability of a genotype at a locus conditional on the genotypes of its flanking markers in advance intercross lines (AIL).
genoProb(gdat, gmap, step, gr = 2, pos = NULL, method=c("Haldane", "Kosambi"),
msg = FALSE)
gdat |
Genotype data. Should be a matrix or a data frame, with each row representing an observation and each column a marker locus. The column names should be marker names. Each entry should be 1, 2, 3 or 0, corresponding to "AA", "AB", "BB" or missing genotype. |
gmap |
A genetic map. Should be data frame (snp, chr, dist,...), where "snp" is the SNP (marker) name, "chr" is the chromosome where the "snp" is, and "dist" is the genetic distance in centi-Morgan (cM) from the left of the chromosome. |
step |
Optional. If specified, it is the maximum "cumulative" genetic distance (in cM) between two adjacent loci for which the probabilities are calculated. The genetic distance corresponds to the "cumulative" recombination rate at |
gr |
The generation under consideration. |
pos |
Data frame (chr, dist, snp, ...). If given, |
method |
Whether "Haldane" or "Kosambi" mapping function should be used. |
msg |
A logical variable. If TRUE, certain information will be printed out during calculation. |
The "cumulative" genetic distance between any two adjacent loci for which probabilities are calculated is not larger than step
. If step
is missing or step = Inf
, probabilities will only be calculated at loci in both the columns of gdat
and the rows of gmap
. If step
is small, a large set of putative loci will be considered, including all loci defined by the columns of gdat
and the rows of gmap
.
Probabilities for genotypes as well as genetic map information (snp,chr,dist)
pr |
A 3-D array with the first dimension corresponding to that of |
Currently only suitable for advanced intercross lines.
data(miscEx)
## Not run:
# briefly look at genotype data
sum(is.na(gdatF8))
gdatF8[1:5,1:5]
gdtmp<- gdatF8
gdtmp<- replace(gdtmp,is.na(gdtmp),0)
# In case an individual is not imputable, then
# one needs to assign genotypes manually
prDat<- genoProb(gdat=gdtmp, gmap=gmapF8, gr=8, method="Haldane", msg=TRUE)
prDat$pr[1:5,,1:5]
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.