22d5ed169d378a1fbc1b5f76488771be106c9b1f galt Wed Dec 3 17:19:19 2025 -0800 Allows bigGenePred to used like genePred and provide CDS FASTA output from Table Browser. fixes #34712 diff --git src/hg/hgTables/pal.c src/hg/hgTables/pal.c index 7941c33838a..d5771ae9c48 100644 --- src/hg/hgTables/pal.c +++ src/hg/hgTables/pal.c @@ -1,93 +1,93 @@ /* Copyright (C) 2011 The Regents of the University of California * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */ #include "common.h" #include "trackDb.h" #include "cart.h" #include "hgTables.h" #include "pal.h" boolean isPalCompatible(struct sqlConnection *conn, struct trackDb *track, char *table) /* Return TRUE if table is genePred and there is a maf. */ { char setting[128], *p = setting; if (track == NULL) return FALSE; if (isEmpty(track->type)) return FALSE; safecpy(setting, sizeof setting, track->type); char *type = nextWord(&p); -if (!sameString(type, "genePred")) +if (!(sameString(type, "genePred") || sameString(type, "bigGenePred"))) return FALSE; if (!sameString(track->table, table)) return FALSE; /* we also check for a maf table */ struct slName *list = hTrackTablesOfType(conn, "wigMaf%%"); if (list != NULL) { slFreeList(&list); return TRUE; } return FALSE; } void doGenePredPal(struct sqlConnection *conn) /* Output genePred protein alignment. */ { if (doGalaxy() && !cgiOptionalString(hgtaDoGalaxyQuery)) { sendParamsToGalaxy(hgtaDoPalOut, "submit"); return; } /* get rid of pesky cookies that would bring us back here */ cartRemove(cart, hgtaDoPal); cartRemove(cart, hgtaDoPalOut); if (anyIntersection() && intersectionIsBpWise()) errAbort("Can't do CDS FASTA output when bit-wise intersection is on. " "Please go back and select another output type, or clear the intersection."); checkNoGenomeDisabled(database, curTable); struct lm *lm = lmInit(64*1024); int fieldCount; struct bed *bedList = cookedBedsOnRegions(conn, curTable, getRegions(), lm, &fieldCount); //lmCleanup(&lm); textOpen(); int outCount = palOutPredsInBeds(conn, cart, bedList, curTable); /* Do some error diagnostics for user. */ if (outCount == 0) explainWhyNoResults(NULL); } void addOurButtons() /* callback from options dialog to add navigation buttons */ { printf("For information about output data format see the " "User's Guide.
"); cgiMakeButton(hgtaDoPalOut, "get output"); hPrintf(" "); cgiMakeButton(hgtaDoMainPage, "cancel"); hPrintf("\n", hgtaDoPal); } void doOutPalOptions(struct sqlConnection *conn) /* Output pal page. */ { htmlOpen("Select multiple alignment and options for %s", curTrack->shortLabel); palOptions(cart, conn, addOurButtons, hgtaDoPal); htmlClose(); }