calculategphmm: Calculate GPHMM probability.

Description Usage Arguments Examples

View source: R/RcppExports.R

Description

This function returns the GPHMM probability that a read x could have been sequenced from a reference sequence y.

Usage

1
calculategphmm(x, y, tau, pp, qX, qY, dX, dY, eX, eY)

Arguments

x

string, with the sequence of the read.

y

string, with the sequence of the reference.

tau

double, probability to transition from any state to end state.

pp

matrix, emission probabilities in the M state.

qX

vector, emission probabilities in the insertion state.

qY

vector, emission probabilities in the deletion state.

dX

double, transition probability from the M to the insertion state.

dY

double, transition probability from the M to the deletion state.

eX

double, transition probability from the insertion to the insertion state.

eY

double, transition probability from the deletion to the deletion state.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
param <- initializeGphmm()
tau <- param[['tau']]
pp <- param[['pp']]
qX <- param[['qX']]
qY <- param[['qY']]
dX <- 1/(1+exp(-sum(param[['deltaX']] * c(1, 20))))
dY <- 1/(1+exp(-sum(param[['deltaY']] * c(1, 20))))
eX <- param[['epsX']]
eY <- param[['epsY']]
calculategphmm('ATCG', 'ATGG', tau, pp, qX, qY, dX, dY, eX, eY)

gphmm documentation built on Oct. 2, 2017, 5:03 p.m.