File: as.matrix.alignment.R

package info (click to toggle)
r-cran-seqinr 3.3-3-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,844 kB
  • ctags: 69
  • sloc: ansic: 1,955; makefile: 13
file content (8 lines) | stat: -rw-r--r-- 236 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
as.matrix.alignment <- function(x, ...){
  nc <- nchar(x$seq[[1]])
  res <- matrix(data = sapply(x$seq, s2c), nrow = x$nb, ncol = nc,
                byrow = TRUE)
  rownames(res) <- x$nam
  colnames(res) <- seq_len(nc)
  return(res)
}