Open jazdrv opened 6 years ago
needs testing certainly ...
but here's an attempt to get something working for this feature.
the way it works: redux.py snpname^vID <-- for the snpname/variant ID combo that will take precedence among its clade peers
ie: redux.py -cp Z2^395691
created issue https://github.com/jazdrv/dnaTools/issues/29 ... an idea that could be used as a structure to properly solve the clade scheme requirement.
there's a couple ways to do this. but one easy way ... would just be the idea that you could override it manually in using redux.py
ie: ./redux.py -cp u106
-cp = clade priority
such that ... whatever clade-mates u106 has at any given moment, would take 2nd priority in visual display on the matrix
if the clade mates change, there's no issue ... because it would only be based upon what the current clade-mates are.
how to do this:
a routine is needed that would change:
(1) sort.VARIANTS (attribute of sort obj) (2) mx_dupe_variants
there also needs to be a new table, I'd think:
create table mx_clade_priorities( snpname text, sortOrder int );
I'm thinking that this feature would just be applicable to those variants that have names. otherwise, it gets a little confusing being able to check both a variantId and a name. but it's certainly possible to accommodate both ideas.
Perhaps it might make sense to make the priority variants the bigger sortOrder (int) values in the table. That way ... it's easy to stack them and just always give precedence to the latest.
I'm also thinking that if a variant is split ... that it's priority attributes should be dropped. But there should be a message indicating why/what happened to cause this.
Last idea ... much like the refpos.txt file ... this could also be a text file that is initially loaded on db instantiation. And continually appended to. Whenever new ideas come about.