0bfbdaee856ddbfe25ab81e5dc821578a13e4808
cline
  Tue Nov 1 16:51:30 2011 -0700
To address Redmine #1118 and code review question #5839: repeated domain links.  I changed the code so this problem wouldn't appear with SCOP, but forgot to change it for Pfam because I'd changed the data for Pfam (but only on hg19).  Now I'm making the code change for Pfam too, replacing a SELECT with a SELECT DISTINCT
diff --git src/hg/lib/hdb.c src/hg/lib/hdb.c
index 88c3da3..0811de3 100644
--- src/hg/lib/hdb.c
+++ src/hg/lib/hdb.c
@@ -4959,31 +4959,31 @@
 return sqlQuickList(conn, query);
 }
 
 struct slName *getPfamDomainList(struct sqlConnection *conn, char *ucscGeneId)
 /* Get list of accessions from external database associated with
  * Pfam protein domain entity.  */
 {
 char query[255];
 char lowerCaseName[255];
 
 /* Capitalize first character for description table name */
 safef(lowerCaseName, sizeof(lowerCaseName), "pfam");
 lowerCaseName[0] = tolower(lowerCaseName[0]);
 
 safef(query, sizeof(query),
-    "select value from knownToPfam k, %sDesc p"
+    "select distinct value from knownToPfam k, %sDesc p"
     " where name = '%s' and value=p.pfamAC "
     , lowerCaseName, ucscGeneId);
 return sqlQuickList(conn, query);
 }
 
 boolean isUnknownChrom(char *dataBase, char *chromName)
 /* Return true if chrom is one of our "unknown" chromomsomes (e.g. chrUn). */
 {
 return  endsWith(chromName, "_random") || startsWith("chrUn", chromName);
 }
 
 char *hGenbankModDate(char *acc, struct sqlConnection *conn)
 /* Get string for genbank last modification date, or NULL if not found..
  * Free resulting string. */
 {