e0db353cfefb9bde9cce31d6a2c2d2762dc1de4a kate Wed Sep 12 17:19:14 2018 -0700 IMplement fieldName> expansion in trackDb url setting. refs #22078 diff --git src/hg/hgc/hgc.h src/hg/hgc/hgc.h index a185e03..0e14e02 100644 --- src/hg/hgc/hgc.h +++ src/hg/hgc/hgc.h @@ -414,30 +414,33 @@ /* Generate image as PNG, PDF, EPS: world map with pie charts for population allele frequencies. */ char *hgdpPngFilePath(char *rsId); /* Return the stable PNG trash-cached image path for rsId. */ void hgdpGeoFreqTable(struct hgdpGeo *geo); /* Print an HTML table of populations and allele frequencies. */ void printOtherSnpMappings(char *table, char *name, int start, struct sqlConnection *conn, int rowOffset); /* If this SNP (from any bed4+ table) is not uniquely mapped, print the other mappings. */ void printCustomUrl(struct trackDb *tdb, char *itemName, boolean encode); /* Wrapper to call printCustomUrlWithLabel using the url setting in trackDb */ +void printCustomUrlWithFields(struct trackDb *tdb, char *itemName, char *itemLabel, boolean encode, struct slPair *fields); +/* Wrapper to call printCustomUrlWithLabel with additional fields to substitute */ + void printOtherCustomUrl(struct trackDb *tdb, char *itemName, char* urlSetting, boolean encode); /* Wrapper to call printCustomUrlWithLabel to use another url setting other than url in trackDb e.g. url2, this allows the use of multiple urls for a track * to be set in trackDb. */ void printIdOrLinks(struct asColumn *col, struct hash *fieldToUrl, struct trackDb *tdb, char *idList); /* if trackDb does not contain a "urls" entry for current column name, just print idList as it is. * * Otherwise treat idList as a comma-sep list of IDs and print one row per id, with a link to url, * * ($$ in url is OK, wildcards like $P, $p, are also OK) * * */ void printDbSnpRsUrl(char *rsId, char *labelFormat, ...) /* Print a link to dbSNP's report page for an rs[0-9]+ ID. */ #ifdef __GNUC__ __attribute__((format(printf, 2, 3))) #endif @@ -490,30 +493,33 @@ void doGtexGeneExpr(struct trackDb *tdb, char *item); /* Details of GTEX gene expression item */ void doGtexEqtlDetails(struct trackDb *tdb, char *item); /* Details of GTEx eQTL item */ void printAddWbr(char *text, int distance); /* a crazy hack for firefox/mozilla that is unable to break long words in tables * We need to add a <wbr> tag every x characters in the text to make text breakable. */ struct slPair* getExtraFields(struct trackDb *tdb, char **fields, int fieldCount); /* return the extra field names and their values as a list of slPairs */ +struct slPair *getFields(struct trackDb *tdb, char **fields); +/* return field names and their values as a list of slPairs. */ + int extraFieldsPrint(struct trackDb *tdb,struct sqlResult *sr,char **fields,int fieldCount); // Any extra bed or bigBed fields (defined in as and occurring after N in bed N + types. // sr may be null for bigBeds. // Returns number of extra fields actually printed. #define NUCCORE_SEARCH "https://www.ncbi.nlm.nih.gov/sites/entrez?db=nuccore&cmd=search&term=" void doJRepeat (struct trackDb *tdb, char *repeat); /* New RepeatMasker Visualization defined in joinedRmskClick.c */ INLINE char* strOrNbsp(char* val) /* return val if not empty otherwise HTML entity */ { return isEmpty(val) ? " " : val; }