a0d13c768fa16b3baf5f6c50babff087f13b1421 angie Wed Mar 14 17:06:27 2018 -0700 Use wgEncodeGencodeCompV* for ENS* searches, not just the Basic subset. refs #21076 diff --git src/hg/lib/hgHgvs.c src/hg/lib/hgHgvs.c index ef8889b..c26718f 100644 --- src/hg/lib/hgHgvs.c +++ src/hg/lib/hgHgvs.c @@ -759,35 +759,35 @@ char *txAcc = NULL; struct sqlConnection *conn = hAllocConn(db); char *attrsTable = hFindLatestGencodeTableConn(conn, "Attrs"); if (attrsTable && hHasField(db, attrsTable, "proteinId")) { char query[2048]; sqlSafef(query, sizeof(query), "select transcriptId from %s where proteinId = '%s'", attrsTable, protAcc); txAcc = sqlQuickString(conn, query); } hFreeConn(&conn); return txAcc; } static struct genePred *getGencodeGp(char *db, char *acc) -/* Return the genePred for acc in the latest wgEncodeGencodeBasicV* table, or NULL if not found. */ +/* Return the genePred for acc in the latest wgEncodeGencodeCompV* table, or NULL if not found. */ { struct genePred *gp = NULL; struct sqlConnection *conn = hAllocConn(db); -char *gencodeTable = hFindLatestGencodeTableConn(conn, "Basic"); +char *gencodeTable = hFindLatestGencodeTableConn(conn, "Comp"); if (gencodeTable) { int hasBin = 1; char query[2048]; sqlSafef(query, sizeof(query), "select * from %s where name = '%s'", gencodeTable, acc); struct sqlResult *sr = sqlGetResult(conn, query); char **row; if ((row = sqlNextRow(sr)) != NULL) gp = genePredExtLoad(row+hasBin, GENEPREDX_NUM_COLS); sqlFreeResult(&sr); } hFreeConn(&conn); return gp; } @@ -1852,31 +1852,31 @@ cds->start = cds->end = -1; cds->startComplete = cds->endComplete = cds->complement = FALSE; char *acc = *pAcc; if (startsWith("ENS", acc)) { struct genePred *gp = getGencodeGp(db, acc); if (gp) { int qSize = 0; // infer -- no polyAs in Gencode because it's genome-based txAli = genePredToPsl(gp, hChromSize(db, gp->chrom), qSize); genePredToCds(gp, cds); if (retPslTable) { // Well, it's not PSL but it's the track table: struct sqlConnection *conn = hAllocConn(db); - *retPslTable = hFindLatestGencodeTableConn(conn, "Basic"); + *retPslTable = hFindLatestGencodeTableConn(conn, "Comp"); hFreeConn(&conn); } } } else { char *pslTable = pslTableForAcc(db, acc); if (pslTable && hTableExists(db, pslTable)) { if (hgvs->type == hgvstCoding) getCds(db, acc, cds); txAli = pslForQName(db, pslTable, acc); } // As of 9/26/16, ncbiRefSeqPsl is missing some items (#13673#note-443) -- so fall back // on UCSC alignments.