Aligns clusters within or across K. This is similar to what CLUMPP does.
alignK(qlist, type = "auto")
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'. |
A qlist object with clusters switched where necessary.
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.
sfiles <- list.files(path=system.file("files/structure",package="pophelper"), full.names=TRUE) slist <- readQ(sfiles) xlist <- alignK(slist)