StuntsPT / Structure_threader

A wrapper program to parallelize and automate runs of "Structure", "fastStructure" and "MavericK".
GNU General Public License v3.0
24 stars 11 forks source link

Sort the individuals by population before sorting #18

Closed StuntsPT closed 9 years ago

StuntsPT commented 9 years ago

If a user provides a structure file that is not sorted by population, the result is a messy plot. The plot function (or even better, the parser) should sort the individuals by their population value before plotting.

ODiogoSilva commented 9 years ago

What if the user does not wish to sort individuals by population, explicitly? I'm thinking of cases where the user suspects of another kind of structure that is not driven by the established populations.

StuntsPT commented 9 years ago

In that case our plotting that issues population names is just plain wrong, because the plotting is sorted. (the population divisions simply add the number of individuals of each population and assumes they are already sorted by this order).

StuntsPT commented 9 years ago

Also, if what you mention is the purpose of the analysis, than the input file should reflect that order. Does this sound reasonable to you?

StuntsPT commented 9 years ago

Better yet. Sort the plot based on the order provided in the "popfile". Commit f135955fea3d47b002e0e397a42a398a12aa5c19 adds the popfile input to _Structurethreader, so now only a few changes to the plotting function are required,