R/HSSPScore.R

Defines functions HSSPScore

Documented in HSSPScore

HSSPScore <- function(PID,
                      MatchLength) {
  if (MatchLength <= 11L) {
    Score <- PID - 100L
  } else if (MatchLength > 11L && MatchLength <= 450L) {
    L <- -0.32 * (1 + exp(-MatchLength/1000))
    Score <- PID - (480L * MatchLength^L)
  } else {
    Score <- PID - 19.5
  }
  return(Score)
}
npcooley/Heron documentation built on April 4, 2020, 10:24 p.m.