R/defineSrand.R

Defines functions defineStrand

### obtain strand in bump-finding
defineStrand <- function(strand){
  if(all(strand== "+")){
    peakStrand = "+"
  }else if (all(strand == "-")) {
    peakStrand = "-"
  } else if (sum(strand == "*")>0 |
             (sum(strand == "+") >0 &&
              sum(strand == "-") >0)){
    peakStrand = "*"
  }else if(sum(strand == ".") >0){
    peakStrand = "."
  }
  return(peakStrand)
}
ZhenxingGuo0015/TRESS documentation built on April 14, 2023, 4:21 p.m.