nextstrain / flora

DB management, APIs, web portals etc.
2 stars 3 forks source link

allow segment downloading #2

Closed jameshadfield closed 6 years ago

trvrb commented 6 years ago

I'm not sure I like the direction this is headed. Currently download takes subtype, segment and locus: https://github.com/nextstrain/flora/pull/2/files#diff-92d1176a15501016fcbcca39dd9099e4R16

This feels entirely arbitrary. Many pathogens won't even have subtype. Would be much better to be able to filter to arbitrary fields when downloading and not have the download method continually grow. Reasonable to ask for all Zika sequences with country:brazil for example. Currently, add_filter_to_query is suitably generic, but subtype, segment, etc.. is getting specifically passed in here: https://github.com/nextstrain/flora/pull/2/files#diff-92d1176a15501016fcbcca39dd9099e4R110

Separate discussion is how segment vs locus should behave. For a full genome, like Ebola, should it be segment:genome and locus:genome. Seems odd, but I don't have an obvious suggestion. But would be also good to think about how bacteria will be behave. Does segment work for chromosome vs plasmid?

However, okay to merge this and then separately fix things to be more generic.

trvrb commented 6 years ago

Merging for the moment as it works just fine and we can return to larger issues.