fst_restore {qtl2fst} | R Documentation |
Restore fst_genoprob object to original dimensions.
Description
Any "fst_genoprob"
object has embedded its original data and dimensions.
This resets elements ind
, chr
and mar
to the full set.
Usage
fst_restore(object)
fst_genoprob_restore(object)
Arguments
object |
Object of class |
Details
Object is unclassed and elements ind
, chr
and mar
are changed before
reseting attributes as "fst_genoprob"
object.
See fst_genoprob()
for details on the object.
Value
Input object
with dimensions restored.
Functions
-
fst_genoprob_restore
: Deprecated version (to be removed).
See Also
Examples
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)
# subset probabilities
fprobs2 <- subset(fprobs, chr=1:2)
# use object to get the full probabilities back
fprobs5 <- fst_restore(fprobs2)
# clean up: remove all the files we created
unlink(fst_files(fprobs))
[Package qtl2fst version 0.28 Index]