e70152e44cc66cc599ff6b699eb8adc07f3e656a
kent
Sat May 24 21:09:34 2014 -0700
Adding Copyright NNNN Regents of the University of California to all files I believe with reasonable certainty were developed under UCSC employ or as part of Genome Browser copyright assignment.
diff --git src/hg/hgTables/galaxy.c src/hg/hgTables/galaxy.c
index 007838b..6fe64b6 100644
--- src/hg/hgTables/galaxy.c
+++ src/hg/hgTables/galaxy.c
@@ -1,137 +1,140 @@
/* galaxy - stuff related to galaxy simple queries and db info. */
+/* Copyright (C) 2014 The Regents of the University of California
+ * See README in this or parent directory for licensing information. */
+
#include "common.h"
#include "hash.h"
#include "linefile.h"
#include "jksql.h"
#include "cheapcgi.h"
#include "trackDb.h"
#include "customTrack.h"
#include "hdb.h"
#include "web.h"
#include "portable.h"
#include "hui.h"
#include "featureBits.h"
#include "hgTables.h"
#include "obscure.h"
#include "cart.h"
#include "grp.h"
#include "net.h"
#include "htmlPage.h"
#include "wiggle.h"
#include "trashDir.h"
char *getGalaxyUrl()
/* Returns the url for the galaxy cgi; default can be overriden by cart var GALAXY_URL.
* Don't free result. */
{
char *url = NULL;
/* use parameter if available */
if (cartVarExists(cart, "GALAXY_URL"))
url = cartString(cart, "GALAXY_URL");
else
url = GALAXY_URL_APP;
return url;
}
void galaxyHandler (char *format, va_list args)
/* error Handler that passes error on to Galaxy */
{
char msg[512];
sprintf(msg, format, args);
noWarnAbort();
}
void sendParamsToGalaxy(char *doParam, char *paramVal)
/* intermediate page for formats printed directly from top form */
{
char *shortLabel = curTable;
char *output = cartString(cart, hgtaOutputType);
if (curTrack != NULL)
shortLabel = curTrack->shortLabel;
htmlOpen("Output %s as %s", "results to Galaxy", shortLabel);
if (sameString(output, outPrimaryTable) || sameString(output, outSelectedFields))
{
if (anySubtrackMerge(database, curTable))
errAbort("Can't do all fields output when subtrack merge is on. "
"Please go back and select another output type (BED or custom track is good), or clear the subtrack merge.");
if (anyIntersection())
errAbort("Can't do all fields output when intersection is on. "
"Please go back and select another output type (BED or custom track is good), or clear the intersection.");
}
if (isMafTable(database, curTrack, curTable))
{
hPrintf("You are about to download a VERY large dataset to Galaxy. "
"For most usage scenarios it is not necessary as Galaxy already "
"stores alignments locally. Click here ("
"http://wiki.galaxyproject.org/Main/MAF%%20Analysis"
") for more information on how to analyze multiple alignments "
"through Galaxy.\n
");
}
startGalaxyForm();
/* send the hgta_do parameter that won't be in the cart */
cgiMakeHiddenVar(doParam, paramVal);
/* need to send sessionId */
cgiMakeHiddenVar(cartSessionVarName(cart), cartSessionId(cart));
printGalaxySubmitButtons();
htmlClose();
}
void startGalaxyForm ()
/* start form to send parameters to Galaxy, also send required params */
{
char selfUrl[256];
char *hguid = cartUserId(cart);
hPrintf("