Open kmassana opened 9 years ago
i.e.,
SplitAlignmentOnce <- function(boundaries, sequences) { start <- boundaries[1] stop <- boundaries[2] if(stop<start) { stop("stop is less than start") } sub.sequences <- sequences[, start:stop] return(sub.sequences) } SplitAlignment <- function(start, stop, sequences) { all.boundaries <- cbind(start, stop) return(apply(all.boundaries, 1, SplitAlignmentOnce, sequences=sequences)) }
where start and stop are vectors of start and stop points
i.e.,
where start and stop are vectors of start and stop points