probs2fst: Store genotype probabilities in fst database

Description Usage Arguments Details Value Functions See Also Examples

Description

Save an R/qtl2 genotype probabilities object to a set of fst files for fast access with reduced memory usage.

Usage

1
2
fst_genoprob(genoprob, fbase, fdir = ".", compress = 0,
  verbose = TRUE, overwrite = FALSE, quiet = !verbose)

Arguments

genoprob

Object of class "calc_genoprob". For details, see the R/qtl2 developer guide and qtl2::calc_genoprob().

fbase

Base of filename for fst database.

fdir

Directory for fst database.

compress

Amount of compression to use (value in the range 0-100; lower values mean larger file sizes)

verbose

Opposite of quiet; deprecated argument (to be removed).

overwrite

If FALSE (the default), refuse to overwrite any files that already exist.

quiet

If FALSE (the default), show messages about fst database creation.

Details

The genotype probabilities are stored in separate databases for each chromosome as tables of (indivduals*genotypes) x (positions) in directory fst. The dim, dimnames and is_x_chr elements of the object have information about the entire fst database. If a fst_genoprob object is a subset of another such object, the chr, ind, and mar contain information about what is in the subset. However, the fst databases are not altered in a subset, and can be restored by fst_restore(). The actual elements of an "fst_genoprob" object are only accessible to the user after a call to unclass(); instead the usual access to elements of the object invoke subset.fst_genoprob().

Value

A list containing the attributes of genoprob and the address for the created fst database. Components are:

Functions

See Also

fst_path(), fst_extract(), fst_files(), replace_path(), fst_restore()

Examples

1
2
3
4
5
6
library(qtl2)
grav2 <- read_cross2(system.file("extdata", "grav2.zip", package="qtl2"))
map <- insert_pseudomarkers(grav2$gmap, step=1)
probs <- calc_genoprob(grav2, map, error_prob=0.002)
dir <- tempdir()
fprobs <- fst_genoprob(probs, "grav2", dir, overwrite=TRUE)

kbroman/qtl2fst documentation built on July 18, 2019, 3:06 a.m.