R/seqifpos.R

Defines functions seqifpos

Documented in seqifpos

seqifpos <- function(seqdata) {
  nbst <- length(alphabet(seqdata))
  fpos <- matrix(0, nrow(seqdata), nbst)
  for (i in 1:nbst) fpos[,i] <- seqfpos(seqdata, alphabet(seqdata)[i])
  #fpos[is.na(fpos)] <- 999
  colnames(fpos) <- paste0("fpos", alphabet(seqdata))
  fpos <- as.data.frame(fpos)
  return(fpos)
}
nicolas-robette/seqhandbook documentation built on April 9, 2023, 7:08 a.m.