Aligns clusters within or across K. This is similar to what CLUMPP does.

alignK(qlist, type = "auto")

Arguments

qlist

A qlist object

type

A character denoting whether clusters must be aligned within K or across K. Select 'auto', 'within' or 'across'. Defaults to 'auto'.

Value

A qlist object with clusters switched where necessary.

Details

When 'within' is selected, clusters are aligned across replicate runs within a given K. When 'across' is selected, clusters are aligned across replicate runs within a given K and then across K. When 'auto' is selected, if all runs belong to a single K, clusters are aligned within that K, and if multiple K is present, the 'across' method is used.

Examples

sfiles <- list.files(path=system.file("files/structure",package="pophelper"), full.names=TRUE) slist <- readQ(sfiles) xlist <- alignK(slist)