cba (version 0.2-21)

sdists.center.align: Align Sequences to a Center

Description

Find a global alignment of a collection of sequences using the center-star-tree heuristic.

Usage

sdists.center.align(x, center, method = "ow", weight = c(1, 1, 0, 2),
                    exclude = c(NA, NaN, Inf, -Inf),
                    break.ties = TRUE, transitive = FALSE,
                    to.data.frame = FALSE)

Value

Either a list of sequences with attributes center and

ties, or a data.frame with the sequences in the columns.

Arguments

x

a list (of vectors) or a vector of character.

center

a vector

method

argument to sdists.

weight

argument to sdists.

exclude

arguments to sdists.

break.ties

a logical specifying whether random tie-breaking should be performed. Otherwise the first alignment is used.

transitive

a logical specifying whether the sequences in x should be aligned with each other, too.

to.data.frame

a logical specifying whether the result should be converted to data.frame.

Author

Christian Buchta

Details

Each component of x is aligned with center in turn such that the latter is aligned with all sequences processed so far.

If center is missing isdists.center is used to compute an initial center.

References

D. Gusfield (1997). Algorithms on Strings, Trees, and Sequences. Cambridge University Press, Chapter XX.

See Also

sdists for computation of distances, sdists.center for computation of centroids.

Examples

Run this code
## continue example
x <- c("ABCD", "AD", "BCD", "ACF", "CDF", "BC")
sdists.center.align(x)
sdists.center.align(x, transitive = TRUE, to.data.frame = TRUE)

Run the code above in your browser using DataLab