225c0d55992aefae478461bba278644bdfdda3c5 max Wed Jan 15 08:33:57 2014 -0800 library changes for the browser box: This changes mostly hdb and jksql,plus - to a smaller extent - various other places in the code that deal with /gbdb/ files. The overall aim is to make it possible to have the data remote at UCSC while having the CGIs on a machine far away. At up to 180msecs distance from UCSC (Europe,Japan), each query can get slow. So I tried to reduce the number of queries sent to UCSC while allowing to keep some mysql tables on localhost. I changed four things: - extend larry's table cache to include field names. The code uses "describe" very often, which is slow from remote. With a table name cache these queries can be handled locally. This is configured in hg.conf - mysql "failover" connections: a mysql connection can have a 2nd connection that is used if a query fails, configured in hg.conf (I didn't call it "remote" connections, because we use that term already in the code) - mysql lazy connects: don't connect a sqlConnection right away, but only when needed. a mysql connect takes >500msecs from across the atlantic. - move gbdb: patch various places that use absolute "/gbdb/" pathnames to go through a central function that can change the filename of gbdb files to something else, as configured in hg.conf Plus patch 1 or 2 lines for more speed + update the hgMirror script diff --git src/hg/hgGene/alleles.c src/hg/hgGene/alleles.c index 66b5a1e..6254e3f 100644 --- src/hg/hgGene/alleles.c +++ src/hg/hgGene/alleles.c @@ -27,30 +27,31 @@ { haplotypeExtrasFree(&he); return FALSE; } he->chrom = gp->chrom; // Probably not needed he->justModel = lmCloneString(he->lm,geneId); //he->growTree = FALSE; // Tree growing not needed here // Need to determine the correct vcf file and open it if (haplotypesDiscoverVcfFile(he, gp->chrom) == NULL) { haplotypeExtrasFree(&he); return FALSE; } + struct vcfFile *vcff = vcfTabixFileMayOpen(he->inFile, NULL, 0, 0,VCF_IGNORE_ERRS, 0); if (vcff == NULL) { haplotypeExtrasFree(&he); return FALSE; } vcfFileMakeReusePool(vcff,1024 * 1024); // All or Limit to the 99% boolean rareVars = cartUsualBoolean(cart, HAPLO_RARE_VAR, FALSE); if (rareVars) he->synonymous = TRUE; else he->variantMinPct = HAPLO_COMMON_VARIANT_MIN_PCT;