run_calcgenoprob: Run calc_genoprob and save result to rds

View source: R/run_calcgenoprob.R

run_calcgenoprobR Documentation

Run calc_genoprob and save result to rds

Description

Run calc_genoprob and save result to rds

Usage

run_calcgenoprob(
  cross_file,
  output_file,
  map_file = NULL,
  step = 0,
  off_end = 0,
  stepwidth = c("fixed", "max"),
  error_prob = 0.0001,
  map_function = c("haldane", "kosambi", "c-f", "morgan"),
  cores = 1,
  compress = FALSE
)

Arguments

cross_file

Character string with path to RDS file containing cross

output_file

Character string with path to RDS file for output

map_file

Character string with path to RDS file for writing genetic map (with inserted pseudomarkers)

step

Distance between pseudomarkers and markers; if step=0 no pseudomarkers are inserted.

off_end

Distance beyond terminal markers in which to insert pseudomarkers.

stepwidth

Indicates whether to use a fixed grid (stepwidth="fixed") or to use the maximal distance between pseudomarkers to ensure that no two adjacent markers/pseudomarkers are more than step apart.

error_prob

Assumed genotyping error probability

map_function

Character string indicating the map function to use to convert genetic distances to recombination fractions.

cores

Number of CPU cores to use, for parallel calculations. (If 0, use parallel::detectCores().) Alternatively, this can be links to a set of cluster sockets, as produced by parallel::makeCluster().

compress

If TRUE, save compressed RDS files (smaller but slower).

Examples

input_file <- paste0("https://github.com/rqtl/qtl2data/",
                     "blob/master/B6BTBR/b6btbr.zip")
## Not run: cross2rds(input_file, "b6btbr.rds")
## Not run: run_calcgenoprob("b6btbr.rds", "b6btbr_probs.rds", "b6btbr_gmap.rds")

rqtl/qtl2cl documentation built on Oct. 13, 2024, 1:11 a.m.