heteroplasmyShift: Transformed heteroplasmy shift

View source: R/heteroplasmyShift.R

heteroplasmyShiftR Documentation

Transformed heteroplasmy shift

Description

A numerical transformation of the heteroplasmy samples in order to work with the heteroplasmy shifts across diverse samples (e.g., due to time or different tissue samples). This transformation is used for comparing a heteroplasmy observation h to a reference value h0. It corresponds to the formula:

\Deltah =ln((h(h0 - 1))/(h0(h - 1)))

Usage

heteroplasmyShift(h, h0)

Arguments

h

The heteroplasmy observation. Can be either a single value or a vector of observations. Every observation should be in [0,1].

h0

The reference heteroplasmy value. Should be in [0,1].

Value

The Transformed heteroplasmy shift.

Author(s)

Kostas and Iain, us@example.com

References

Site or paper

See Also

readHeteroplasmyData

Examples

# size of the sample
n=50
#generate a random sample of size n from a normal distribution
data_ex=rnorm(n,0.5,0.1)
heteroplasmyShift(data_ex)

mouseData=readHeteroplasmyData("HB")
mouseData1 = mouseData[which(!is.na(mouseData[,1])),1]
heteroplasmyShift(mouseData1,nrep=10000)

kostasgian21/heteroplasmy documentation built on Jan. 30, 2024, 12:30 a.m.