R/seqlen.R

Defines functions seqlen

Documented in seqlen

##' sequence length
##'
##'
##' @title seqlen
##' @param fasfile fasta file
##' @return numeric vector
##' @export
##' @author Guangchuang Yu
seqlen <- function(fasfile) {
  x <- fa_read(fasfile)
  yy <- toString(x)
  yy <- gsub("-", "", yy)
  yy <- gsub(" ", "", yy)
  xx <- strsplit(yy, ",")
  sapply(xx, nchar)
}

Try the seqmagick package in your browser

Any scripts or data that you put into this service are public.

seqmagick documentation built on July 9, 2023, 7:36 p.m.