f00ee8d8e407da35c50e5d61815250a49960dabe angie Tue Dec 5 13:52:12 2023 -0800 More refinements for displaying RSV results. Still need to make it more config-driven. diff --git src/hg/hgPhyloPlace/phyloPlace.c src/hg/hgPhyloPlace/phyloPlace.c index 116b270..7875023 100644 --- src/hg/hgPhyloPlace/phyloPlace.c +++ src/hg/hgPhyloPlace/phyloPlace.c @@ -1547,71 +1547,74 @@ TOOLTIP("Number of bases in aligned portion of uploaded sequence that are not present in " "reference %s") "\nDeleted bases" TOOLTIP("Number of bases in reference %s that are not " "present in aligned portion of uploaded sequence") "", refName, refName, refName); puts("#SNVs used for placement" TOOLTIP("Number of single-nucleotide variants in uploaded sample " "(does not include N's or mixed bases) used by UShER to place sample " "in phylogenetic tree") "\n#Masked SNVs" TOOLTIP("Number of single-nucleotide variants in uploaded sample that are masked " "(not used for placement) because they occur at known " "Problematic Sites"));; -boolean isRsv = (stringIn("GCF_000855545", db) || stringIn("GCF_002815475", db)); +boolean isRsv = (stringIn("GCF_000855545", db) || stringIn("GCF_002815475", db) || + startsWith("RGCC", db)); if (gotClades) { if (sameString(db, "wuhCor1")) puts("\nNextstrain clade" TOOLTIP("The Nextstrain clade assigned to the sample by " "placement in the tree")); else if (isRsv) puts("\n" "Goya 2020 clade" TOOLTIP("The clade described in " "Goya et al. 2020, " ""Toward unified molecular surveillance of RSV: A proposal for " "genotype definition" " "assigned by placement in the tree")); else puts("\nNextstrain lineage" TOOLTIP("The Nextstrain lineage assigned by " "placement in the tree")); } if (gotLineages) { if (isRsv) - puts("\n" - "RGCC 2023 clade" + puts("\nRGCC 2023 clade" TOOLTIP("The RSV Genotyping Consensus Consortium clade (manuscript in preparation) " "assigned by placement in the tree")); else puts("\nPango lineage" TOOLTIP("The Pango lineage assigned to the sample by UShER")); } puts("\nNeighboring sample in tree" TOOLTIP("A sample already in the tree that is a child of the node at which the uploaded " "sample was placed, to give an example of a closely related sample") "\nLineage of neighbor"); if (sameString(db, "wuhCor1")) puts(TOOLTIP("The " "Pango lineage assigned by pangolin " "to the nearest neighboring sample already in the tree")); +else if (isRsv) + puts(TOOLTIP("The RGCC 2023 clade assigned by Nextclade " + "to the nearest neighboring sample already in the tree")); else puts(TOOLTIP("The lineage assigned by Nextclade " "to the nearest neighboring sample already in the tree")); puts("\n#Imputed values for mixed bases" TOOLTIP("If the uploaded sequence contains mixed/ambiguous bases, then UShER may assign " "values based on maximum parsimony") "\n#Maximally parsimonious placements" TOOLTIP("Number of potential placements in the tree with minimal parsimony score; " "the higher the number, the less confident the placement") "\nParsimony score" TOOLTIP("Number of mutations/changes that must be added to the tree when placing the " "uploaded sample; the higher the number, the more diverged the sample") "\nSubtree number" TOOLTIP("Sequence number of subtree that contains this sample") ""); @@ -2017,48 +2020,86 @@ puts(""); } puts("

"); } } static void summarizeSubtrees(struct slName *sampleIds, struct usherResults *results, struct hash *sampleMetadata, struct tempName *jsonTns[], char *db, int subtreeSize) /* Print a summary table of pasted/uploaded identifiers and subtrees */ { boolean gotClades = FALSE, gotLineages = FALSE; lookForCladesAndLineages(results->samplePlacements, &gotClades, &gotLineages); puts(""); puts(""); +boolean isRsv = (stringIn("GCF_000855545", db) || stringIn("GCF_002815475", db) || + startsWith("RGCC", db)); if (gotClades) + { + if (sameString(db, "wuhCor1")) puts(""); + else if (isRsv) + puts(""); + else + puts(""); + } if (gotLineages) + { + if (sameString(db, "wuhCor1")) puts(""); + else if (isRsv) + puts(""); + } +if (sameString(db, "wuhCor1")) puts("" - ""); + ""); +else if (isRsv) + puts(""); +else + puts(""); +puts(""); struct slName *si; for (si = sampleIds; si != NULL; si = si->next) { puts(""); printf("", pi->nextClade ? pi->nextClade : "n/a"); if (gotLineages) printLineageTd(pi->pangoLineage, "n/a", db); } else {
SequenceNextstrain clade (UShER)" TOOLTIP("The Nextstrain clade " "assigned to the sequence by UShER according to its place in the phylogenetic tree") "" + "Goya 2020 clade" + TOOLTIP("The clade described in " + "Goya et al. 2020, " + ""Toward unified molecular surveillance of RSV: A proposal for " + "genotype definition" " + "assigned by placement in the tree") + "Nextstrain lineage" + TOOLTIP("The Nextstrain lineage assigned by " + "placement in the tree") + "Pango lineage (UShER)" TOOLTIP("The Pango lineage " "assigned to the sequence by UShER according to its place in the phylogenetic tree") "RGCC 2023 clade" + TOOLTIP("The RSV Genotyping Consensus Consortium clade (manuscript in preparation) " + "assigned by placement in the tree") + "Pango lineage (pangolin)" TOOLTIP("The " "Pango lineage assigned to the sequence by " "pangolin") - "subtree
RGCC 2023 clade (Nextclade)" + TOOLTIP("The RGCC clade assigned by Nextclade " + "to the nearest neighboring sample already in the tree") + "Nextclade lineage" + TOOLTIP("The lineage assigned by Nextclade " + "to the nearest neighboring sample already in the tree") + "subtree
%s", replaceChars(si->name, "|", " | ")); struct placementInfo *pi = hashFindVal(results->samplePlacements, si->name); if (pi) { if (gotClades) printf("%s