Compute average signal in state segmentation

Share:

Description

Compute average signal in state segmentation

Usage

1
getAvgSignal(viterbi, obs, fct=mean)

Arguments

viterbi

A list containing the viterbi paths as factors. The output from getViterbi.

obs

The observations. A list of one or more entries containing the observation matrix (numeric) for the samples (e.g. chromosomes).

fct

The averaging function, default: mean.

Value

A state x data track matrix containing the average signal.

Examples

1
2
3
4
5
6
7
data(yeastTF_databychrom_ex)
nStates = 6
dirobs = as.integer(c(rep(0,10), 1, 1))
bdhmm_gauss = initBdHMM(yeastTF_databychrom_ex, nStates, "Gaussian", directedObs=dirobs)
bdhmm_fitted_gauss = fitHMM(yeastTF_databychrom_ex, bdhmm_gauss)
viterbi_bdhmm_gauss = getViterbi(bdhmm_fitted_gauss, yeastTF_databychrom_ex)
avg_signal = getAvgSignal(viterbi_bdhmm_gauss, yeastTF_databychrom_ex)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.