0a01cd0845e94f390d6522016c6caf247ba36b96 angie Thu Jul 1 17:25:59 2021 -0700 Adding Auspice colorings contributed by @babarlelephant in github PR #57. diff --git src/hg/hgPhyloPlace/treeToAuspiceJson.c src/hg/hgPhyloPlace/treeToAuspiceJson.c index b7987b3..e94b5c3 100644 --- src/hg/hgPhyloPlace/treeToAuspiceJson.c +++ src/hg/hgPhyloPlace/treeToAuspiceJson.c @@ -44,36 +44,52 @@ " [ \"20E (EU1)\", \"#44CC44\" ], [ \"20F\", \"#8822AA\" ]," " [ \"20G\", \"#8888FF\" ], [ \"20H/501Y.V2\", \"#6666FF\" ]," " [ \"20I/501Y.V1\", \"#CC44EE\" ], [ \"20A.EU2\", \"#448844\" ], " " [ \"uploaded sample\", \"#FF0000\" ] ]," " \"title\": \"Nextstrain Clade\", \"type\": \"categorical\" }," , outF); if (sameString(source, "GISAID")) fputs(" { \"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\" }" + " \"title\": \"Sample type\", \"type\": \"categorical\" }," + " {\"key\": \"gt\", \"title\": \"Genotype\", \"type\": \"categorical\"}," + " {\"key\": \"country\", \"title\": \"Country\", \"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\" ], " "\"filters\": [ ], " + "\"genome_annotations\":" + "{\"E\":{\"end\":26472,\"start\":26245,\"strand\":\"+\",\"type\":\"CDS\"}," + " \"M\":{\"end\":27191,\"start\":26523,\"strand\":\"+\",\"type\":\"CDS\"}," + " \"N\":{\"end\":29533,\"start\":28274,\"strand\":\"+\",\"type\":\"CDS\"}," + " \"ORF1a\":{\"end\":13468,\"start\":266,\"strand\":\"+\",\"type\":\"CDS\"}," + " \"ORF1b\":{\"end\":21555,\"start\":13468,\"strand\":\"+\",\"type\":\"CDS\"}," + " \"ORF3a\":{\"end\":26220,\"start\":25393,\"strand\":\"+\",\"type\":\"CDS\"}," + " \"ORF6\":{\"end\":27387,\"start\":27202,\"strand\":\"+\",\"type\":\"CDS\"}," + " \"ORF7a\":{\"end\":27759,\"start\":27394,\"strand\":\"+\",\"type\":\"CDS\"}," + " \"ORF7b\":{\"end\":27887,\"start\":27756,\"strand\":\"+\",\"type\":\"CDS\"}," + " \"ORF8\":{\"end\":28259,\"start\":27894,\"strand\":\"+\",\"type\":\"CDS\"}," + " \"ORF9b\":{\"end\":28577,\"start\":28284,\"strand\":\"+\",\"type\":\"CDS\"}," + " \"S\":{\"end\":25384,\"start\":21563,\"strand\":\"+\",\"type\":\"CDS\"}," + " \"nuc\":{\"end\":29903,\"start\":1,\"strand\":\"+\",\"type\":\"source\"}}," "\"display_defaults\": { " " \"branch_label\": \"none\", " " \"color_by\": \"Nextstrain_clade\" " "}, " , 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);