R/convertstrandinfo.R

Defines functions convertstrandinfo

Documented in convertstrandinfo

#' Converts strand info to 1 / -1
#'
#' @param strandvector vector of strand information to convert from +/- to 1/-1 if neccesary
convertstrandinfo <- function(strandvector)
{
  if (class((strandvector)) == "character")
  {
    print ("yes")
    b = rep(1,length((strandvector)))
    b[which((strandvector) == "-")] = -1
    strandvector = b
  }
  return (strandvector)
}
dphansti/Sushi documentation built on Oct. 30, 2021, 10:20 p.m.