7cd88510c60532d95aee9e98ba02d191990d873e angie Sat Oct 15 20:34:05 2022 -0700 Fixing typo in corner case of writing alt alleles for VCF with imputed alleles, that caused segv when parsing the generated VCF. https://github.com/yatisht/usher/issues/282 diff --git src/hg/hgPhyloPlace/writeCustomTracks.c src/hg/hgPhyloPlace/writeCustomTracks.c index 1ee0bde..eae53d6 100644 --- src/hg/hgPhyloPlace/writeCustomTracks.c +++ src/hg/hgPhyloPlace/writeCustomTracks.c @@ -128,31 +128,31 @@ { if (alt->name[1] == '\0' && val[1] == '\0' && isIupacAmbiguous(alt->name[0])) { char lowerV = tolower(val[0]); if (strchr(iupacAmbiguousToString(alt->name[0]), lowerV)) { verbose(3, "gtIx %d: val (%s) matches ambig alts[%d] (%s)\n", gtIx, val, altIx, alt->name); // The alt is an ambiguous character that includes val. // Replace this alt with val. foundIt = TRUE; alt->name[0] = val[0]; // Update the alts column - words[4] = slNameListToString(alts, '.'); + words[4] = slNameListToString(alts, ','); int len = strlen(words[colIx]); safef(words[colIx], len+1, "%d", altIx+1); verbose(3, "gtIx %d: swapped in %s\n", gtIx, words[colIx]); break; } } } if (!foundIt) { // Add the imputed value as a new alt. int altCount = slCount(alts); verbose(3, "gtIx %d: adding val as new alts[%d] = %s\n", gtIx, altCount, val); int len = strlen(words[colIx]);