fst_restore: Restore fst_genoprob object to original dimensions.

Description Usage Arguments Details Value Functions See Also Examples

View source: R/fst_restore.R

Description

Any "fst_genoprob" object has embedded its original data and dimensions. This resets elements ind, chr and mar to the full set.

Usage

1
2
3

Arguments

object

Object of class "fst_genoprob" as produced by fst_genoprob().

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

See Also

fst_genoprob(), fst_extract()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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)
dim(fprobs)
fprobs2 <- subset(fprobs, chr=1:2)
dim(fprobs2)
fprobs5 <- fst_restore(fprobs2)
dim(fprobs5)

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