06d7be056190c14b85e71bc12523f18ea6815b5e markd Mon Dec 7 00:50:29 2020 -0800 BLAT mmap index support merge with master diff --git src/hg/near/hgNear/getSeq.c src/hg/near/hgNear/getSeq.c index 130556f..d962e3c 100644 --- src/hg/near/hgNear/getSeq.c +++ src/hg/near/hgNear/getSeq.c @@ -33,31 +33,31 @@ hPrintf(" %s", name); if (description != NULL) hPrintf(" - %s", description); freeMem(name); freeMem(description); } static void getSeqFromBlob(struct sqlConnection *conn, struct column *colList, struct genePos *geneList, char *tableId) /* Get sequence from blob field in table and print it as fasta. */ { struct sqlResult *sr; char **row; char query[256]; struct genePos *gp; -struct sqlConnection *conn2 = hAllocConn(database); +struct sqlConnection *conn2 = hAllocConn(sqlGetDatabase(conn)); char *tableName = genomeSetting(tableId); struct column *descCol = findNamedColumn("description"); struct column *nameCol = findNamedColumn("name"); hPrintf("
");
 for (gp = geneList; gp != NULL; gp = gp->next)
     {
     char *id = gp->name;
     sqlSafef(query, sizeof(query), 
     	"select seq from %s where name = '%s'", tableName, id);
     sr = sqlGetResult(conn, query);
     if ((row = sqlNextRow(sr)) != NULL)
 	{
 	char *seq = row[0];
 	hPrintf(">%s", id);
@@ -215,31 +215,31 @@
 struct hTableInfo *hti = hFindTableInfo(database, NULL, genomeSetting("geneTable"));
 makeTitle("Get Genomic Sequence Near Gene", NULL);
 hPrintf("
\n"); cartSaveSession(cart); hgSeqOptionsHtiCart(hti, cart); hPrintf("
\n"); cgiMakeButton(getGenomicSeqVarName, "get sequence"); hPrintf("
"); } void doGetGenomicSeq(struct sqlConnection *conn, struct column *colList, struct genePos *geneList) /* Retrieve genomic sequence sequence according to options. */ { char *table = genomeSetting("geneTable"); -struct hTableInfo *hti = hFindTableInfo(database, NULL, table); +struct hTableInfo *hti = hFindTableInfo(sqlGetDatabase(conn), NULL, table); struct genePos *gp; char query[256]; struct sqlResult *sr; char **row; boolean hasBin = hOffsetPastBin(database, NULL, table); makeTitle("Genomic Sequence", NULL); hPrintf("
");
 for (gp = geneList; gp != NULL; gp = gp->next)
     {
     char *id = gp->name;
     sqlSafef(query, sizeof(query), "select * from %s where name='%s'", 
     	table, id);
     sr = sqlGetResult(conn, query);
     while ((row = sqlNextRow(sr)) != NULL)