thetaAB2TotalAndFracB.array: Converts an Jx2xI array between (thetaA,thetaB) and...

Description Usage Arguments Value Examples

Description

Converts an Jx2xI array between (thetaA,thetaB) and (total,fracB) formats.

Usage

1
2
## S3 method for class 'array'
thetaAB2TotalAndFracB(data, ..., verbose=FALSE)

Arguments

data

An Jx2xI numeric array, where J is the number of SNPs, 2 is the number of alleles, and I is the number of samples.

...

Not used.

verbose

See Verbose.

Value

Returns an Jx2xI numeric array.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Load example (thetaA,thetaB) signals
path <- system.file("exData", package="calmate");
theta <- loadObject("thetaAB,100x2x40.Rbin", path=path);

data <- thetaAB2TotalAndFracB(theta);
str(data);

theta2 <- totalAndFracB2ThetaAB(data);
str(theta2);

stopifnot(all.equal(theta2, theta));

calmate documentation built on May 2, 2019, 10:11 a.m.