b0a3428869e27d1281b82cbd74671eeee5c6e31a cline Mon Oct 24 18:24:58 2011 -0700 To resolve Redmine # 1118, repeating domain links. The issue is that when a protein has multiple instances of the same domain, the known gene details page shows multiple (redundant) links to the domain entry. Resolved this by replacing a 'select' statement with a 'select distinct' diff --git src/hg/lib/hdb.c src/hg/lib/hdb.c index 91a2616..88c3da3 100644 --- src/hg/lib/hdb.c +++ src/hg/lib/hdb.c @@ -4941,31 +4941,31 @@ /* PLEASE NOTE: USE getPfamDomainList() FOR PFAM DOMAINS */ struct slName *getDomainList(struct sqlConnection *conn, char *ucscGeneId, char *domainDb) /* Get list of accessions from external database associated with * protein domain entity. The db parameter can be "Pfam", "Scop", etc. */ { char query[255]; char lowerCaseName[255]; /* Capitalize first character for description table name */ safef(lowerCaseName, sizeof(lowerCaseName), "%s", domainDb); lowerCaseName[0] = tolower(lowerCaseName[0]); safef(query, sizeof(query), - "select acc from ucsc%s u, %sDesc p" + "select distinct acc from ucsc%s u, %sDesc p" " where ucscId = '%s' and u.domainName=p.name " , domainDb, lowerCaseName, ucscGeneId); 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]);