d5a85fd5006b8f3a472e0e5bba0b4e747f668e7f braney Fri Mar 8 18:23:03 2013 -0800 more assembly hub changes to prevent database connections (#8072) diff --git src/hg/hgTables/bam.c src/hg/hgTables/bam.c index 6dff8ee..d697bef 100644 --- src/hg/hgTables/bam.c +++ src/hg/hgTables/bam.c @@ -7,30 +7,31 @@ #include "localmem.h" #include "jksql.h" #include "cheapcgi.h" #include "cart.h" #include "web.h" #include "bed.h" #include "hdb.h" #include "trackDb.h" #include "obscure.h" #include "hmmstats.h" #include "correlate.h" #include "asParse.h" #include "bbiFile.h" #include "bigBed.h" #include "hubConnect.h" +#include "trackHub.h" #include "hgTables.h" #include "asFilter.h" #include "xmlEscape.h" #include "hgBam.h" #if (defined USE_BAM && defined KNETFILE_HOOKS) #include "knetUdc.h" #include "udc.h" #endif//def USE_BAM && KNETFILE_HOOKS boolean isBamTable(char *table) /* Return TRUE if table corresponds to a BAM file. */ { if (isHubTrack(table)) { @@ -320,31 +321,33 @@ struct slName *randomIdList = NULL; int i; for (i=0, sam = samList; inext) slNameAddHead(&randomIdList, sam->qName); /* Clean up and go home. */ lmCleanup(&lm); bamClose(&fh); freez(&fileName); return randomIdList; } void showSchemaBam(char *table, struct trackDb *tdb) /* Show schema on bam. */ { -struct sqlConnection *conn = hAllocConn(database); +struct sqlConnection *conn = NULL; +if (!trackHubDatabase(database)) + conn = hAllocConn(database); char *fileName = bamFileName(table, conn, NULL); struct asObject *as = bamAsObj(); hPrintf("Database: %s", database); hPrintf("    Primary Table: %s
", table); hPrintf("BAM File: %s", fileName); hPrintf("
\n"); hPrintf("Format description: %s
", as->comment); hPrintf("See the SAM Format Specification for more details
\n", "http://samtools.sourceforge.net/SAM1.pdf"); /* Put up table that describes fields. */ hTableStart(); hPrintf("field"); hPrintf("description ");