acca3deffc05c4d8d11590a1cf3d893763254712
angie
Thu Oct 31 13:43:05 2019 -0700
dbSnp153: Adding new ucscNotes suggested by Ana Benet: clinvar{Benign,Conflicting,Pathogenic}, rareAll, rareSome. refs #23283
diff --git src/hg/hgc/bigDbSnpClick.c src/hg/hgc/bigDbSnpClick.c
index 88cafe8..cde26f1 100644
--- src/hg/hgc/bigDbSnpClick.c
+++ src/hg/hgc/bigDbSnpClick.c
@@ -258,36 +258,38 @@
printAlleleCountsAndFreqs(bds, details, tdb);
printDetailsRow(details, "Functional effects", details->soTermCount, printOneSoTerm);
printDetailsRow(details, "ClinVar", details->clinVarCount, printOneClinVar);
printDetailsRow(details, "Submitted by", details->submitterCount, printOneSubmitter);
printDetailsRow(details, "Publications in PubMed", details->pubMedIdCount, printOnePub);
}
static void printUcscNotes(char *ucscNotes)
/* Print explanations of ucscNotes items. */
{
if (isNotEmpty(ucscNotes))
{
puts("
Interesting or anomalous conditions noted by UCSC:
");
puts("
");
boolean isCommonAll = (stringIn(bdsCommonAll, ucscNotes) != NULL);
+ boolean isRareAll = (stringIn(bdsRareAll, ucscNotes) != NULL);
struct slName *note, *noteList = slNameListFromComma(ucscNotes);
for (note = noteList; note != NULL; note = note->next)
{
// When commonAll is true, commonSome is also true but not informative,
- // so skip commonSome if commonAll is true.
- if (! (isCommonAll && sameString(note->name, bdsCommonSome)))
+ // so skip commonSome if commonAll is true. Likewise for rareAll & rareSome.
+ if (! ((isCommonAll && sameString(note->name, bdsCommonSome)) ||
+ (isRareAll && sameString(note->name, bdsRareSome))))
{
char *desc = bigDbSnpDescribeUcscNote(note->name);
printf("- %s\n", desc ? desc : note->name);
}
}
puts("
");
}
}
static char *getMinRep(char *ref, char *alt, boolean leftJustify)
/* If ref and alt can be trimmed down to a shorter representation then return that, othw NULL. */
{
char *minRep = NULL;
int refLen = strlen(ref);
int altLen = strlen(alt);