45c26f5159bd9d55840ce1efa611df6039fe8a36 max Tue Aug 13 06:58:22 2024 -0700 small function docs changes to hdb.h diff --git src/hg/inc/hdb.h src/hg/inc/hdb.h index 6eee5c1..8e0bab9 100644 --- src/hg/inc/hdb.h +++ src/hg/inc/hdb.h @@ -207,30 +207,31 @@ boolean hTableOrSplitExists(char *db, char *table); /* Return TRUE if table (or a chrN_table) exists in database. */ char *hTableForTrack(char *db, char *trackName); /* Return a table for a track in db. Returns one of the split * tables, or main table if not split */ char *hReplaceGbdbLocal(char* fileName); /* Returns a gbdb filename, potentially rewriting it according to hg.conf's gbdbLoc1 */ /* Result has to be freed */ char *hReplaceGbdb(char* fileName); /* clone and change a filename that can be located in /gbdb to somewhere else * according to hg.conf's "gbdbLoc1" and "gbdbLoc2". Result has to be freed. + * This function either returns a local filename or a URL to the same file on hgdownload. * * NB: This header is duplicated in hg/lib/straw/hReplaceGbdb.h so that it can be used * in cStraw.cpp without wrestling with warnings about converting string data types * in included library headers. If this function signature changes, it will also need * to be changed there. * */ char *hReplaceGbdbSeqDir(char *path, char *db); /* similar to hReplaceGbdb, but accepts a nib or 2bit "directory" (basename) under * gbdb, like /gbdb/hg19 (for jkLib that means /gbdb/hg19/hg19.2bit). */ char* hReplaceGbdbMustDownload(char* path); /* given a location in /gbdb, rewrite it to the new location using gbdbLoc1 and download it * if needed from gbdbLoc2. */ @@ -289,35 +290,37 @@ boolean hScaffoldPos(char *db, char *chrom, int start, int end, char **retScaffold, int *retStart, int *retEnd); /* Return the scaffold, and start end coordinates on a scaffold, for * a chromosome range. If the range extends past end of a scaffold, * it is truncated to the scaffold end. * Return FALSE if unable to convert */ struct dnaSeq *hDnaFromSeq(char *db, char *seqName, int start, int end, enum dnaCase dnaCase); /* Fetch DNA in a variety of cases. */ struct dnaSeq *hLoadChrom(char *db, char *chromName); /* Fetch entire chromosome into memory. */ void hNibForChrom(char *db, char *chromName, char retNibName[HDB_MAX_PATH_STRING]); -/* Get .nib file associated with chromosome. */ +/* Get .2bit or .nib file associated with chromosome. These days, at UCSC, will always return + * a .2bit file. On mirrors, it may return a URL. */ void hNibForChromFromPath(char *nibPath, char *db, char *chromName, char retNibName[HDB_MAX_PATH_STRING]); -/* Get .nib file associated with chromosome, given a nib file path. */ +/* Get .2bit or .nib file associated with chromosome given a directory. These days, at UCSC, will always return + * a .2bit file. On mirrors, it may return a URL. */ struct slName *hAllChromNames(char *db); /* Get list of all chromosomes in database. */ char *hExtFileNameC(struct sqlConnection *conn, char *extFileTable, unsigned extFileId); /* Get external file name from table and ID. Typically * extFile table will be 'extFile' or 'gbExtFile' * Abort if the id is not in the table or if the file * fails size check. Please freeMem the result when you * are done with it. (requires conn passed in) */ char *hExtFileName(char *db, char *extFileTable, unsigned extFileId); /* Get external file name from table and ID. Typically * extFile table will be 'extFile' or 'gbExtFile' * Abort if the id is not in the table or if the file