update_trans: update_trans

Description Usage Arguments Value Examples

Description

update_trans updates trans once.

Usage

1
update_trans(num, H)

Arguments

num

number of chain

H

list of matrix H

Value

A vector of length 3, the updated paratemter and fval c(v'[k], m'[k], fval)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
df <- uORF[1:2]
X <- H <- list()
E <- c()
for (i in 1:2){
  X[[i]] <- df[[i]]$x
  RNA <- df[[i]]$RNA
  E[i]=df[[i]]$E;   trans=df[[i]]$trans;
  a=df[[i]]$v;      b=df[[i]]$v/df[[i]]$m
  la <- forwardAlg(X[[i]], RNA, trans, a, b, E[i])
  lb <- backwardAlg(X[[i]], RNA, trans, a, b, E[i])
  H[[i]] <- computeH(X[[i]], RNA, trans, a, b, E[i], la, lb)
}

update_trans(length(df), H)

shimlab/riboHMM2 documentation built on May 19, 2019, 6:23 p.m.