f7cecc053e7a9020e7f4669f552a3ded1bacb497 markd Mon Dec 21 14:49:37 2015 -0800 fixed bug with APPRIS changes generating invalid select in certain cases diff --git src/hg/hgc/gencodeClick.c src/hg/hgc/gencodeClick.c index 0d31df9..610a12c 100644 --- src/hg/hgc/gencodeClick.c +++ src/hg/hgc/gencodeClick.c @@ -260,31 +260,31 @@ static void writePosLink(char *chrom, int chromStart, int chromEnd) /* write link to a genomic position */ { printf("%s:%d-%d", hgTracksPathAndSettings(), database, chrom, chromStart, chromEnd, chrom, chromStart+1, chromEnd); } static bool geneHasApprisTranscripts(struct trackDb *tdb, struct sqlConnection *conn, struct wgEncodeGencodeAttrs *transAttrs) /* check if any transcript in a gene has an APPRIS tags */ { char query[1024]; safef(query, sizeof(query), "%s tag where tag.tag like \"appris%%\" and transcriptId in " - "(select transcriptId from %s where geneId=\"%s\"", + "(select transcriptId from %s where geneId=\"%s\")", getGencodeTable(tdb, "wgEncodeGencodeTag"), getGencodeTable(tdb, "wgEncodeGencodeAttrs"), transAttrs->geneId); return sqlRowCount(conn, query) > 0; } static char* findApprisTag(struct wgEncodeGencodeTag *tags) /* search list for APPRIS tag or NULL */ { struct wgEncodeGencodeTag *tag; for (tag = tags; tag != NULL; tag = tag->next) { if (startsWith("appris_", tag->tag)) return tag->tag; }