adegenet icon indicating copy to clipboard operation
adegenet copied to clipboard

Add method to check if hierarchy is hierarchical.

Open zkamvar opened this issue 9 years ago • 6 comments

The hierarchy slot currently will store a formula defining what levels of the strata slot are hierarchical. One thing that we do not have implemented is a method to actually confirm that the the assigned levels are indeed hierarchical. If I recall, both @jgx65 and @ericarcher have devised methods to address this. Once written, the method could be placed in this line of code.

The function should ideally take in a data frame representing the hierarchy and return TRUE or FALSE.

zkamvar avatar Mar 31 '15 15:03 zkamvar

@jgx65 @EricArcher See above: do you guys have some code for validating the hierarchical structure? This is one of the major things left to do in terms of basic data structure.

thibautjombart avatar Apr 09 '15 10:04 thibautjombart

Sorry, but I do not.

EricArcher avatar Apr 10 '15 07:04 EricArcher

I think we can pencil this one down as a long term objective. Changing milestone.

thibautjombart avatar Jun 19 '15 09:06 thibautjombart

Pinging @jgx65.

zkamvar avatar Mar 03 '16 19:03 zkamvar

Sorry, just discovering this. No currently, no code for checking a hierarchy available. But should have one, as many people are using varcomp with non hierarchical levels...

jgx65 avatar Mar 04 '16 14:03 jgx65

What would such an algorithm look like? I can see something that would compare the counts of each partition, but I'm not sure how to implement it. How would it know which one is top-level in a hierarchy like below?

Pop SubPop
A 1
A 2
B 1
B 2

zkamvar avatar Mar 04 '16 20:03 zkamvar