d3752edc12da1bf08427946150f564dbdd5d2254 angie Thu Oct 24 13:55:51 2019 -0700 bigDbSnp track handler code - initial commit. refs #23283 * dnautil: Added trimRefAltLeft to get left-justified trimming (a la VCF not HGVS). * bigBedClick: do hReplaceGbdb up front in parseDetailsTablUrls instead of waiting until endpoint. * trackDbCustom.c: consolidating type-handling for wig/bigWig vs. bigBed-based big*. diff --git src/hg/inc/trackDb.h src/hg/inc/trackDb.h index 2da2dbe..0cdaabf 100644 --- src/hg/inc/trackDb.h +++ src/hg/inc/trackDb.h @@ -426,30 +426,31 @@ cfgWigMaf =3, cfgPeak =4, cfgGenePred =5, cfgChain =6, cfgNetAlign =7, cfgBedFilt =8, cfgBam =9, cfgPsl =10, cfgVcf =11, cfgSnake =12, cfgLong =13, cfgBarChart =14, cfgInteract =15, cfgLollipop =16, cfgHic =17, + cfgBigDbSnp =19, cfgUndetermined // Not specifically denied, but not determinable in lib code } eCfgType; eCfgType cfgTypeFromTdb(struct trackDb *tdb, boolean warnIfNecessary); /* determine what kind of track specific configuration is needed, warn if not multi-view compatible */ int configurableByAjax(struct trackDb *tdb, eCfgType cfgTypeIfKnown); // Is this track configurable by right-click popup, or in hgTrackUi subCfg? // returns 0 = nothing to cfg; <0=blocked via ajax; >0=allowed and will be cfgType if determinable void trackDbOverride(struct trackDb *td, struct trackDb *overTd); /* apply an trackOverride trackDb entry to a trackDb entry */ #ifdef OLD @@ -644,39 +645,31 @@ char *tdbBigFileName(struct sqlConnection *conn, struct trackDb *tdb); // Return file name associated with bigWig. Do a freeMem on returned string when done. boolean rTdbTreeCanPack(struct trackDb *tdb); // Trees can pack as all or none, since they can share vis. void tdbSetCartVisibility(struct trackDb *tdb, struct cart *cart, char *vis); // Set visibility in the cart. Handles all the complications necessary for subtracks. // More INLINES which depend on what the definition of "is" is INLINE boolean tdbIsBigBed(struct trackDb *tdb) // Local test to see if something is big bed. Handles hub tracks unlike hIsBigBed. { // TODO: replace with table lookup (same as bigBedFind ?) -return startsWithWord("bigBed", tdb->type) || - startsWithWord("bigGenePred", tdb->type) || - startsWithWord("bigMaf", tdb->type) || - startsWithWord("bigPsl", tdb->type) || - startsWithWord("bigNarrowPeak", tdb->type) || - startsWithWord("bigBarChart", tdb->type) || - startsWithWord("bigInteract", tdb->type) || - startsWithWord("bigLolly", tdb->type) || - startsWithWord("bigChain", tdb->type); +return (!startsWithWord("bigWig", tdb->type) && startsWith("big", tdb->type)); } INLINE boolean tdbIsBigWig(struct trackDb *tdb) // Local test to see if something is big bed. Handles hub tracks unlike hIsBigBed. { return startsWithWord("bigWig", tdb->type) || startsWithWord("mathWig", tdb->type); } INLINE boolean tdbIsLongTabix(struct trackDb *tdb) // Return TRUE if tdb corresponds to a long tabix file. { return startsWithWord("longTabix", tdb->type); } INLINE boolean tdbIsBam(struct trackDb *tdb)