endpoints {ComPairWise}R Documentation

Find the breakpoints between identical and different alignment columns

Description

Finds identical columns followed by different columns, and different columns followed by identical columns. Internal function to find breakpoints for annotating axes.

Usage

endpoints(ident.set, diff.set)

Arguments

ident.set

Numeric indices of identical columns

diff.set

Numeric indices of non-identical columns

Value

A vector of integers.

Author(s)

TER

Examples

##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

identical<-c(1:10,12,15:20)
different<-c(11,13:14,21:25)
a<-endpoints(identical,different);a	#should return c(10,11,12,14,20)

## The function is currently defined as
function (ident.set, diff.set) 
{
    end.points <- c()
    len.all <- length(ident.set) + length(diff.set)
    end.points <- which((1:(len.all - 1) %in% ident.set & 2:(len.all) %in% 
        diff.set) | (1:(len.all - 1) %in% diff.set & 2:(len.all) %in% 
        ident.set))
  }

[Package ComPairWise version 1.01 Index]