R/is.alignable.R

is.alignable <- function(a, threshold = .5){
  d <- dist.dna(a, model = "raw", pairwise.deletion = TRUE, as.matrix = TRUE)
  ub <- list(names(d[, 1])[which(d[, 1] > threshold)],
             names(d[, 1])[which(d[, 1] <= threshold)])
  ub <- ub[order(sapply(ub, length), decreasing = TRUE)]
  length(ub[[2]]) == 0
}

Try the megaptera package in your browser

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

megaptera documentation built on Jan. 15, 2017, 11:19 p.m.