Skip to contents

Return the weights a mixture's components are combined with: an LdMatrix mixture's (NULL for a single panel's LD), or a GenotypeMixture's, named after its panels.

Usage

mixtureWeights(x)

# S4 method for class 'GenotypeMixture'
mixtureWeights(x)

# S4 method for class 'LdMatrix'
mixtureWeights(x)

Arguments

x

An LdMatrix or a GenotypeMixture.

Value

Numeric vector or NULL.

Examples

data(eqtlRegionExample)
X <- eqtlRegionExample$X[, 1:8]
half <- seq_len(nrow(X) / 2)
mix <- LdMatrix(
  list(LdMatrix(cor(X[half, ])), LdMatrix(cor(X[-half, ]))),
  mixtureWeights = c(0.75, 0.25))
mixtureWeights(mix)
#> [1] 0.75 0.25