View source: R/calc_genoprob_fst.R
calc_genoprob_fst | R Documentation |
Uses a hidden Markov model to calculate the probabilities of the true underlying genotypes given the observed multipoint marker data, with possible allowance for genotyping errors.
calc_genoprob_fst(
cross,
fbase,
fdir = ".",
map = NULL,
error_prob = 0.0001,
map_function = c("haldane", "kosambi", "c-f", "morgan"),
lowmem = FALSE,
quiet = TRUE,
cores = 1,
compress = 0,
overwrite = FALSE
)
cross |
Object of class |
fbase |
Base of filename for fst database. |
fdir |
Directory for fst database. |
map |
Genetic map of markers. May include pseudomarker
locations (that is, locations that are not within the marker
genotype data). If NULL, the genetic map in |
error_prob |
Assumed genotyping error probability |
map_function |
Character string indicating the map function to use to convert genetic distances to recombination fractions. |
lowmem |
If |
quiet |
If |
cores |
Number of CPU cores to use, for parallel calculations.
(If |
compress |
Amount of compression to use (value in the range 0-100; lower values mean larger file sizes) |
overwrite |
If FALSE (the default), refuse to overwrite any files that already exist. |
This is like calling qtl2::calc_genoprob()
and then
fst_genoprob()
, but in a way that hopefully saves memory by
doing it one chromosome at a time.
A list containing the attributes of genoprob
and the address for the created fst database.
Components are:
dim
- List of all dimensions of 3-D arrays.
dimnames
- List of all dimension names of 3-D arrays.
is_x_chr
- Vector of all is_x_chr attributes.
chr
- Vector of (subset of) chromosome names for this object.
ind
- Vector of (subset of) individual names for this object.
mar
- Vector of (subset of) marker names for this object.
fst
- Path and base of file names for the fst database.
qtl2::calc_genoprob()
, fst_genoprob()
library(qtl2)
grav2 <- read_cross2(system.file("extdata", "grav2.zip", package="qtl2"))
gmap_w_pmar <- insert_pseudomarkers(grav2$gmap, step=1)
fst_dir <- file.path(tempdir(), "grav2_genoprob")
dir.create(fst_dir)
probs_fst <- calc_genoprob_fst(grav2, "grav2", fst_dir, gmap_w_pmar, error_prob=0.002)
# clean up: remove all the files we created
unlink(fst_files(probs_fst))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.