752e20a9a1dc08793c5b529bbeac4ce5836a6be4 braney Fri Sep 4 17:13:55 2026 -0700 hgc: stop five details-page handlers from aborting over a missing piece. chromSeqFileExists() opened its connection with sqlConnect() and only then asked whether the database existed, so it aborted before it could answer. The otherDb of a chain or net track is often not a local database at all -- a GenArk hub assembly, or one long retired -- so use sqlMayConnect() and return FALSE. This is 112 of the failures the TrackCheck robot reports, most of them hg38 net tracks against HPRC assemblies. Also moved the disconnect out of the if, where it leaked a connection whenever a database had no chromInfo table, and dropped the now-redundant sqlDatabaseExists() call, which was itself a second connection. mgcCloneInfoLoad() aborted when a clone carried no MGC: id in hgFixed.mrnaClone. Nothing on the page reads that field, and a clone can legitimately have only an IMAGE: id, so the check went away rather than the page. hDbOrganism() aborted for an assembly that has left dbDb but is still named by a maf component, which hg16.evofold does via mm3; it now falls back on the database name. The pgSnp SIFT and Polyphen prediction tables are loaded separately from the tracks that name them, so a machine can have the track and not the table, as hgwbeta and the RR do for hg18. Check with hTableExists first and say the predictions are unavailable instead of letting the query take the page down. Same treatment for the RNA fold diagram: a non-zero ghostscript exit now drops only the diagram and keeps the rest of the page, including the PseudoViewer link. Two of these report an unavailable piece through warn(), which still marks the page for the robot. That is deliberate -- the missing hg18 tables and the RNA fold diagram are real defects, and the log should keep naming them until they are fixed. On the RNA fold diagram in particular: RNAplot truncates the sequence id it is given to 42 characters, and the trash path we build is already 41, so it has never written the file ghostscript is asked to convert. That is worth its own fix. refs #37424 diff --git src/hg/inc/chromInfo.h src/hg/inc/chromInfo.h index d724cc93d52..c66366d28f1 100644 --- src/hg/inc/chromInfo.h +++ src/hg/inc/chromInfo.h @@ -1,86 +1,87 @@ /* chromInfo.h was originally generated by the autoSql program, which also * generated chromInfo.c and chromInfo.sql. This header links the database and * the RAM representation of objects. */ /* Copyright (C) 2012 The Regents of the University of California * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */ #ifndef CHROMINFO_H #define CHROMINFO_H #define CHROMINFO_NUM_COLS 3 struct chromInfo /* Chromosome names and sizes */ { struct chromInfo *next; /* Next in singly linked list. */ char *chrom; /* Reference sequence chromosome or scaffold */ unsigned size; /* Chromosome size */ char *fileName; /* Chromosome file (raw one byte per base) */ }; void chromInfoStaticLoad(char **row, struct chromInfo *ret); /* Load a row from chromInfo table into ret. The contents of ret will * be replaced at the next call to this function. */ struct chromInfo *chromInfoLoad(char **row); /* Load a chromInfo from row fetched with select * from chromInfo * from database. Dispose of this with chromInfoFree(). */ struct chromInfo *chromInfoLoadAll(char *fileName); /* Load all chromInfo from whitespace-separated file. * Dispose of this with chromInfoFreeList(). */ struct chromInfo *chromInfoLoadAllByChar(char *fileName, char chopper); /* Load all chromInfo from chopper separated file. * Dispose of this with chromInfoFreeList(). */ #define chromInfoLoadAllByTab(a) chromInfoLoadAllByChar(a, '\t'); /* Load all chromInfo from tab separated file. * Dispose of this with chromInfoFreeList(). */ struct chromInfo *chromInfoCommaIn(char **pS, struct chromInfo *ret); /* Create a chromInfo out of a comma separated string. * This will fill in ret if non-null, otherwise will * return a new chromInfo */ void chromInfoFree(struct chromInfo **pEl); /* Free a single dynamically allocated chromInfo such as created * with chromInfoLoad(). */ void chromInfoFreeList(struct chromInfo **pList); /* Free a list of dynamically allocated chromInfo's */ void chromInfoOutput(struct chromInfo *el, FILE *f, char sep, char lastSep); /* Print out chromInfo. Separate fields with sep. Follow last field with lastSep. */ #define chromInfoTabOut(el,f) chromInfoOutput(el,f,'\t','\n'); /* Print out chromInfo as a line in a tab-separated file. */ #define chromInfoCommaOut(el,f) chromInfoOutput(el,f,',',','); /* Print out chromInfo as a comma separated list including final comma. */ /* -------------------------------- End autoSql Generated Code -------------------------------- */ boolean chromSeqFileExists(char *db, char *chrom); /* Check whether chromInfo exists for a database, find the path of the */ /* sequence file for this chromosome and check if the file exists. */ +/* Returns FALSE, rather than aborting, when db is not a local database. */ struct chromInfo *createChromInfoList(char *name, char *database); /* Load up chromosome information for chrom 'name'. * If name is NULL or "all" then load all chroms. * Similar to featureBits.c - could be moved to library */ struct hash *chromHashFromDatabase(char *db); /* read chrom info from database and return hash of name and size */ struct hash *chromHashFromFile(char *fileName); /* read chrom info from file and return hash of name and size */ struct chromInfo *chromInfoListFromFile(char *fileName) ; /* read chrom info from file and return list of name and size */ struct hash *chromNameAndSizeHashFromList(struct chromInfo *ci); /* Return a hash table of chrom key=name, val=size */ #endif /* CHROMINFO_H */