c1322ce22bfb59b5f98bf6b2aeb72c08fa4632ff max Tue Sep 3 16:52:30 2024 -0700 no feedback from QA for a long time, so committing curl button now but putting under hg.conf control, refs #33415 diff --git src/hg/hgTables/seqOut.c src/hg/hgTables/seqOut.c index 4f97e90..89377e2 100644 --- src/hg/hgTables/seqOut.c +++ src/hg/hgTables/seqOut.c @@ -1,28 +1,29 @@ /* seqOut - Output sequence. */ /* Copyright (C) 2013 The Regents of the University of California * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */ #include "common.h" #include "linefile.h" #include "hash.h" #include "htmshell.h" #include "cheapcgi.h" #include "cart.h" #include "jksql.h" #include "hdb.h" +#include "hgConfig.h" #include "web.h" #include "hui.h" #include "hdb.h" #include "trackDb.h" #include "customTrack.h" #include "hgSeq.h" #include "hgTables.h" #include "genbank.h" static char *genePredMenu[] = { "genomic", "protein", "mRNA", @@ -49,55 +50,68 @@ char *dupType = cloneString(type); char *typeWords[3]; int typeWordCount, typeIx; /* Type field has 1-3 words which are in order: * genePred pepTable mrnaTable */ typeWordCount = chopLine(dupType, typeWords); /* TypeIx will be 0 (genomic) 1 (protein) 2(mrna). */ typeIx = stringArrayIx(predType, genePredMenu, typeWordCount); if (typeIx < 0) predType = genePredMenu[0]; htmlOpen("Select sequence type for %s", track->shortLabel); hPrintf("<FORM ACTION=\"%s\" METHOD=GET>\n", getScriptName()); cartSaveSession(cart); +for (struct cgiVar *vars = cgiVarList(); vars!=NULL; vars=vars->next) + { + //if ((sameOk(vars->name, hgtaDoTopSubmit)) || (sameOk(vars->name, hgtaDoCurl) || sameOk(vars->name, hgtaDoCurlSelected))) + //continue; + + cgiMakeHiddenVar(vars->name, vars->val); + } + if (isRefGeneTrack(track->table)) { /* RefGene covers all 3 types, but in it's own way. */ for (typeIx = 0; typeIx < 3; ++typeIx) { genePredTypeButton(genePredMenu[typeIx], predType); hPrintf(" %s<BR>\n", genePredMenu[typeIx]); } } else { /* Otherwise we always have genomic, and we have * peptide/mrna only if there are corresponding table * in the type field. */ for (typeIx = 0; typeIx < typeWordCount; ++typeIx) { if (typeIx == 0 || sqlTableExists(conn, typeWords[typeIx])) { genePredTypeButton(genePredMenu[typeIx], predType); hPrintf(" %s<BR>\n", genePredMenu[typeIx]); } } } cgiMakeButton(hgtaDoGenePredSequence, "submit"); hPrintf(" "); +if (cfgOptionBooleanDefault("curl", 0)) + { + cgiMakeButton(hgtaDoCurlGenePredSequence, "get curl command"); + hPrintf(" "); + } cgiMakeButton(hgtaDoMainPage, "cancel"); hPrintf("</FORM>\n"); cgiDown(0.9); htmlClose(); freez(&dupType); } void doRefGeneProteinSequence(struct sqlConnection *conn, struct bed *bedList) /* Fetch refGene proteins corresponding to names in bedList. */ { struct hash *uniqHash = newHash(18); struct hash *protHash = newHash(18); struct sqlResult *sr; char **row;