cbind.fst_genoprob: Join genotype probabilities for different chromosomes

Description Usage Arguments Value See Also Examples

View source: R/cbind_fst_genoprob.R

Description

Join multiple genotype probability objects, as produced by fst_genoprob() for different individuals.

Usage

1
2
## S3 method for class 'fst_genoprob'
cbind(..., fbase = NULL, fdir = NULL, overwrite = FALSE, quiet = FALSE)

Arguments

...

Genotype probability objects as produced by fst_genoprob(). Must have the same set of individuals.

fbase

Base of fileame for fst database. Needed if objects have different fst databases.

fdir

Directory for fst database.

overwrite

If FALSE (the default), refuse to overwrite existing .fst files.

quiet

If TRUE, don't show any messages. Passed to fst_genoprob().

Value

A single genotype probability object.

See Also

rbind.fst_genoprob()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
library(qtl2)
grav2 <- read_cross2(system.file("extdata", "grav2.zip", package="qtl2"))
map <- insert_pseudomarkers(grav2$gmap, step=1)
probsA <- calc_genoprob(grav2[1:5,1:2], map, error_prob=0.002)
probsB <- calc_genoprob(grav2[1:5,3:4], map, error_prob=0.002)
dir <- tempdir()
fprobsA <- fst_genoprob(probsA, "exampleAc", dir, overwrite=TRUE)
fprobsB <- fst_genoprob(probsB, "exampleBc", dir, overwrite=TRUE)

# use cbind to combine probabilities for same individuals but different chromosomes
fprobs <- cbind(fprobsA, fprobsB, fbase = "exampleABc", overwrite=TRUE)

# clean up: remove all the files we created
unlink(fst_files(fprobsA))
unlink(fst_files(fprobsB))
unlink(fst_files(fprobs))

qtl2fst documentation built on Oct. 7, 2021, 5:09 p.m.