3e0322b8be3a7a96e99fcfc2b69525e042bc0ac2 angie Mon Apr 1 21:18:03 2024 -0700 Fixing typo bug that caused pangolin lineage lookup to return the column name instead of the actual lineage value. HT @aviczhl2 diff --git src/hg/hgPhyloPlace/phyloPlace.c src/hg/hgPhyloPlace/phyloPlace.c index b7333a3..69085ed 100644 --- src/hg/hgPhyloPlace/phyloPlace.c +++ src/hg/hgPhyloPlace/phyloPlace.c @@ -856,31 +856,31 @@ return met; } static char *lineageForSample(struct hash *sampleMetadata, char *sampleId) /* Look up sampleId's lineage in epiToLineage file. Return NULL if we don't find a match. */ { char *lineage = NULL; struct sampleMetadata *met = metadataForSample(sampleMetadata, sampleId); if (met) { int ix; if ((ix = stringArrayIx("pangolin_lineage", met->columnNames, met->columnCount)) >= 0 || (ix = stringArrayIx("pango_lineage", met->columnNames, met->columnCount)) >= 0 || (ix = stringArrayIx("Nextstrain_lineage", met->columnNames, met->columnCount)) >= 0 || (ix = stringArrayIx("GCC_nextclade", met->columnNames, met->columnCount)) >= 0) - lineage = met->columnNames[ix]; + lineage = met->columnValues[ix]; } return lineage; } static void printLineageLink(char *lineage, char *db) /* Print lineage with link to outbreak.info or pango-designation issue if appropriate. * Caller must handle case of empty/NULL lineage. */ { boolean isSarsCov2 = sameString(db, "wuhCor1"); if (isEmpty(lineage)) errAbort("programmer error:printLineageLink called with empty lineage"); else if (isSarsCov2 && startsWith("proposed", lineage)) printf("<a href='"PANGO_DESIGNATION_ISSUE_URLBASE"%s' target=_blank>%s</a>", lineage+strlen("proposed"), lineage); else if (isSarsCov2 && differentString(lineage, "None") && differentString(lineage, "Unassigned"))