#' Calculate the sequence features.
#' @param newmir  A feature vector represent the microRNA 
#' @param compr  A microRNA set in feature representative data frame which is going to be compared to newmir
#' @param training  Pre-computed data 
#' @return A dataframe.
#' @export

miES <- function(newmir,compr,training){
  newmir_na<-row.names(newmir)
  
  newscore <- data.frame(miES=c(NA),Rank=c(NA),row.names = newmir_na)
  
  pre <- glm(fmla,family=binomial(link='logit'), data=training, maxit = 100)
  
  compr_miES <- predict.glm(pre,type='response',newdata=compr)  
  
  new_miES <- predict.glm(pre,type='response',newdata=newmir) 
  
  new_rank<-rank(c(new_miES,compr_miES),ties.method = "first")
  
  newscore <-c(new_miES,length(compr_miES)-new_rank[1]+2) 
  
  return(newscore)
  
}
