Ejemplo n.º 1
0
boolean mayProcessGenomic(struct sqlConnection *conn, struct customPp *cpp, 
	int colCount, char *formatType, boolean firstLineLabels, 
	struct labeledFile *fileList, boolean report)
/* Process three column file into chromGraph.  If there's a problem
 * print warning message and return FALSE. */
{
struct errCatch *errCatch = errCatchNew();
if (errCatchStart(errCatch))
     processGenomic(conn, cpp, colCount, formatType, firstLineLabels, fileList,
     	report);
return errCatchFinish(&errCatch);
}
Ejemplo n.º 2
0
boolean mayProcessDb(struct sqlConnection *conn,
	struct customPp *cpp, int colCount, char *formatType, 
	boolean firstLineLabels, struct labeledFile *fileList, 
	char *table, char *query, char *aliasTable, char *aliasQuery, 
	boolean report, boolean isSnpTable)
/* Process database table into chromGraph.  If there's a problem
 * print warning message and return FALSE. */
{
struct errCatch *errCatch = errCatchNew();
if (errCatchStart(errCatch))
     processDb(conn, cpp, colCount, formatType, firstLineLabels, 
     	fileList, table, query, aliasTable, aliasQuery, report, isSnpTable);
return errCatchFinish(&errCatch);
}
void submitUpload(struct sqlConnection *conn)
/* Called when they've submitted from uploads page */
{
char *urlText = cartUsualString(cart, hggUploadUrl, NULL);
char *fileText = cartUsualString(cart, hggUploadFile, NULL);
char *rawText = urlText;
if (isNotEmpty(fileText))
  rawText = fileText; 
int rawTextSize = strlen(rawText);
struct errCatch *errCatch = errCatchNew();
cartWebStart(cart, database, "Data Upload Complete (%d bytes)", rawTextSize);
hPrintf("<FORM ACTION=\"../cgi-bin/hgGenome\">");
cartSaveSession(cart);
if (errCatchStart(errCatch))
     trySubmitUpload(conn, rawText);
errCatchFinish(&errCatch);
cartRemove(cart, hggUploadFile);
hPrintf("<CENTER>");
cgiMakeButton("submit", "OK");
hPrintf("</CENTER>");
hPrintf("</FORM>");
cartWebEnd();
}