a9be614b7730455011e5bfcf1f804eecb81f28ec angie Tue Feb 23 20:09:52 2021 -0800 Russ request: by default, color by sample type (uploaded vs. existing) and don't show labels (they hide branches and are unreadable when tree is large). Also update Nextstrain clade colors. diff --git src/hg/hgPhyloPlace/treeToAuspiceJson.c src/hg/hgPhyloPlace/treeToAuspiceJson.c index f1ef1ed..c197b36 100644 --- src/hg/hgPhyloPlace/treeToAuspiceJson.c +++ src/hg/hgPhyloPlace/treeToAuspiceJson.c @@ -28,47 +28,51 @@ fprintf(outF, " and %d other uploaded samples", sampleCount - 1); else { struct slName *sln; for (sln = subtreeUserSampleIds->next; sln != NULL; sln = sln->next) fprintf(outF, ", %s", sln->name); } fputs("\", " "\"panels\": [ \"tree\"] , " "\"colorings\": [ " " { \"key\": \"pangolin_lineage\", " " \"title\": \"Pangolin lineage\", \"type\": \"categorical\" }," " { \"key\": \"Nextstrain_clade\"," " \"scale\": [ [ \"19B\", \"#EC676D\" ], [ \"19A\", \"#F79E43\" ]," " [ \"20A\", \"#B6D77A\" ], [ \"20C\", \"#8FD4ED\" ]," - " [ \"20B\", \"#A692C3\" ] ]," + " [ \"20B\", \"#A692C3\" ], [ \"20D\", \"#8020A0\" ]," + " [ \"20E (EU1)\", \"#44CC44\" ], [ \"20F\", \"#8822AA\" ]," + " [ \"20G\", \"#8888FF\" ], [ \"20H/501Y.V2\", \"#6666FF\" ]," + " [ \"20I/501Y.V1\", \"#CC44EE\" ] ]," " \"title\": \"Nextstrain Clade\", \"type\": \"categorical\" }," " { \"key\": \"GISAID_clade\"," " \"scale\": [ [ \"S\", \"#EC676D\" ], [ \"L\", \"#F79E43\" ], [ \"O\", \"#F9D136\" ]," " [ \"V\", \"#FAEA95\" ], [ \"G\", \"#B6D77A\" ], [ \"GH\", \"#8FD4ED\" ]," " [ \"GR\", \"#A692C3\" ] ]," " \"title\": \"GISAID Clade\", \"type\": \"categorical\" }," , outF); fprintf(outF, " { \"key\": \"userOrOld\", " " \"scale\": [ [ \"uploaded sample\", \"#CC0000\"] , [ \"%s\", \"#000000\"] ]," " \"title\": \"Sample type\", \"type\": \"categorical\" }" , source); fputs(" ] , " //#*** Filters didn't seem to work... maybe something about the new fetch feature, or do I need to spcify in some other way? //#*** "\"filters\": [ \"GISAID_clade\", \"region\", \"country\", \"division\", \"author\" ], " "\"display_defaults\": { " - " \"branch_label\": \"nuc mutations\" " + " \"branch_label\": \"none\", " + " \"color_by\": \"userOrOld\" " "}, " , outF); fprintf(outF, "\"description\": \"Dataset generated by [UShER web interface]" "(%shgPhyloPlace) using the " "[usher](https://github.com/yatisht/usher/) program. " //#*** TODO: describe input from which tree was generated: user sample, version of tree, etc. , hLocalHostCgiBinUrl()); fputs("If you have metadata you wish to display, you can now drag on a CSV file and it will be " "added into this view, [see here]("NEXTSTRAIN_DRAG_DROP_DOC") " "for more info.\"} ," , outF); } static void jsonWriteObjectValue(struct jsonWrite *jw, char *name, char *value)