emmahodcroft / hello-world

GitHub tutorial
0 stars 0 forks source link

Auspice 2.0 / augur export v2 Issues #3

Closed emmahodcroft closed 5 years ago

emmahodcroft commented 5 years ago

Traits

Issue: V1 JSONS allows you to specify legendTitle & menuItem (from config.json, not used in V2), V2 does not. V2 just uses whatever the key/traitvariable is called (ex: age_range1 instead of 'Age Range 1') Where? augur export for V2 JSONS. title field is the same as the key/traitvariable. Missing feature or bug? Missing feature. We don't have any way (AFAK) to say what the title should be. If you manually replace the title field in colorings in V2 JSONS, it displays correctly. Also displays correctly for V2 JSONS generated from V1 JSONS (with auspice convert) Solution? We need a way to specify this in augur export V2 - not obvious best idea?

Issue: V1 JSONS viewed in Auspice 2.0 use legendTitle rather than menuItem for the drop-down colorby menu. If they aren't the same, can lead to uninformative menu items. V2 JSONS generated from V1 JSONS (with auspice convert) also have this problem. (ex: For my menuItems 'Age Range 1', 'Age Range 2', and 'Age Range 3', all use just 'Age Range' as legendTitle. In Auspice 2.0, this results in 3 identical drop-down colorby menu items: 'Age Range', 'Age Range', 'Age Range'.) Where? Augur 2.0, presumably what V1 JSON field it picks to use for the colorby drop-down (the title field). Missing feature of bug? Bug. Since we have a V1 field called menuItem we should use this for the menu item (title field) in Auspice 2.0... (both for auspice convert and when displaying V1) Solution? Use menuItem instead of legendTitle when interpreting V1 JSONs

Issue: Can't exclude anything from 'colorBy' that's in your node-data files (ex: I ran augur traits on 'host' but now I don't want it to show as a colorBy anymore, but I do want to include 'country' and 'region' which are in the same 'traits' JSON.) Where? augur export for V2 JSONS. V1 only includes traits specified in config.json. V2 adds all traits in node-data files, plus any extra given by --extra-traits argument. Missing feature or bug? Missing feature. We don't have any way to say not to display a trait in a node-data JSON as a colorBy. Solution? Need a way to specify this - not obvious best idea? (This is related to first Clade issue below, but below is a special case we should handle specifically.)

(Related - everything is also a filterby. Less pressing, but maybe one doesn't want this for all traits. Also a problem in augur export V2 JSONS)

Clades

Issue: clade_annotation appears in colorBy. This is produced by augur clades to allow text-labels on branches, and should never be a colorBy. (clade_membership should be the colorBy) Where? augur export for V2 JSONS. Same as above Traits issue - auto-adds all traits in node-data JSONS passed in. But in this case, this should NEVER be a colorby (it only colours one internal branch per clade) Missing feature or bug? Bug. We should auto-exclude clade_annotation from being a colorby in augur export V2. However, it needs to still needs to be on the nodes in traits! (Or labels - see related issue below!) Solution? Auto-exclude clade_annotation from colorby in augur export V2, but still export as node trait/label.

Issue: clade_annotation isn't displayed as text labels on nodes on the tree. (In fact, there are no Branch Label options available in the left-hand menu.) Where? A little unsure. V1 JSONS have this as attr clade_annotation on the nodes in tree.json, and this displays fine in Auspice 2.0. V2 JSONS from augur export have this as traits clade_annotation and it does not appear in Auspice 2.0. In V2 JSONS generated from V1 JSONS, (via auspice convert) this info is under clade in labels on the nodes, and displays fine in Auspice 2.0. So maybe both, depending on how we want to fix? augur export V2 should create this labels field? Or, Auspice 2.0 should be able to pull this info out of V2 JSONS as it does with V1? Missing feature or bug? Bug. V2 JSONS not getting or pulling out node labels. Solution? Unsure - augur export V2 should either make labels, as auspice convert does, or Auspice 2.0 should be able to pull info out as it does for V1 JSONS

Traits/Geo

Issue: You haven't done augur traits on 'country,' so it's not in 'traits' node-data JSON. You want to set geo to country (--geography-traits country in augur export V2). Turns out you also must include 'country' in --extra-traits argument for this to work. Where? augur export V2. Missing feature or bug? Missing feature. This is minor, but a redundancy we can easily fix! Solution? Anything in geo (--geography-traits) we automatically add to the 'traits' list in augur export if it's not there already (due to being in 'traits' JSON' or in --extra-traits)

Legends

Issue: Legends are ordered differently to V1/Auspice 1.0 even if exact same info is supplied in same order. augur export V1 (after recent fix) exports colorby traits that have specified colours in the same order as they appear in the colors.tsv file. augur export V2 exports traits with specified colours in alphabetical order. V2 JSONS generated from V1 JSONS (via auspice convert) maintain the order specified in the V1-meta file (so the order in the colors.tsv file). Augur 2.0 displays in whatever order colorby traits are specified in the meta or unified JSON. Where? augur export V2 Missing feature or bug? Could be either I guess, but I'd say bug because it's so different from augur export V1 / Auspice 1.0 behaviour. Users can't overrule the alphabetical ordering, which is at best annoying (see Fig 1 - my pretty rainbow colours!!) and at worse nonsensical (see Fig 2 - my age range order is now 1-5, 18-64, 6-17, <1, >=65, and the corresponding colour gradient from young=red old=blue looks random) Solution? Have augur export V2 export colorby traits in same order as specified in colors.tsv, like in augur export V1

image Fig 1 - i hate to see you lookin so bad

image Fig 2 - oh my eyes :(

More!

I noticed something new? Nucleotide colorby doesn't seem to be working properly? If I click on sites in NT view, either entropy or events, the entropy bar zooms correctly and everything, but the tree doesn't recolor... it acts like there is only 1 base at this position (no variance/variants). This doesn't work for V2 JSONS generated by augur export V2, V2 JSONS generated from V1 (via auspice convert), or V1 JSONS. Must be Auspice 2.0 problem.

jameshadfield commented 5 years ago

Thanks @emmahodcroft -- let's discuss in the UK?

Here are some quick notes while I have internet:

We need a way to specify this in augur export V2 - not obvious best idea?

I can't think of any way apart from a config file unfortunately. We could also provide command line args, which may be enough for simple cases.

clade_annotation isn't displayed as text labels on nodes on the tree

in v2 these aren't traits, they're under the labels property on nodes, so we'll have to change augur export to do this.

Nucleotide colorby doesn't seem to be working properly?

:scream:

jameshadfield commented 5 years ago

P.S. Great image captions.

P.P.S. Thanks so much for actually testing out auspice v2 -- it's immensely helpful

jameshadfield commented 5 years ago

@emmahodcroft

emmahodcroft commented 5 years ago

Sorry, working through all this in an order that may not match how they came in 🙃 . Most of this I address in latest comment on issue #5!

Yes - clades is fixed!

"Traits/Geo" - I didn't realise it above but this is somewhat two issues: if you specify something as --geography-traits it needs to be written on the nodes in export JSON to work, but does not necessarily need to be a colorby (if we so decide). Currently these two things are rather entangled, but we should separate them out better - see my comments on the other issue.

For excluding trait colorbys and also about 'filters', see the other issue! :)

jameshadfield commented 5 years ago

cool. Closing this as I think everything's being talked about in other issues. Re-open if not!