Пример #1
0
void dispatch()
/* Set up a connection to database and dispatch control
 * based on hgpDo type var. */
{
struct sqlConnection *conn = sqlConnect(visiDb);
if (cartVarExists(cart, hgpDoThumbnails))
    doThumbnails(conn);
else if (cartVarExists(cart, hgpDoImage))
    doImage(conn);
else if (cartVarExists(cart, hgpDoProbe))
    doProbe(conn);
else if (cartVarExists(cart, hgpDoControls))
    doControls(conn);
else if (cartVarExists(cart, hgpDoId))
    doId(conn);
#ifdef SOON
else if (cartVarExists(cart, hgpDoConfig))
    configPage(conn);
#endif /* SOON */
else if (cartVarExists(cart, hgpDoSearch))
    doDefault(conn, TRUE);
else
    {
    char *oldListSpec = hashFindVal(oldCart, hgpListSpec);
    char *newListSpec = cartOptionalString(cart, hgpListSpec);
    boolean isNew = differentStringNullOk(oldListSpec, newListSpec);
    doDefault(conn, isNew);
    }
cartRemovePrefix(cart, hgpDoPrefix);
}
Пример #2
0
void CoverageFile::processHits(RecordOutputMgr *outputMgr, RecordKeyVector &hits) {
	   makeDepthCount(hits);
	   _finalOutput.clear();

	   switch(upCast(_context)->getCoverageType()) {
	   case ContextCoverage::COUNT:
		   doCounts(outputMgr, hits);
		   break;

	   case ContextCoverage::PER_BASE:
		   doPerBase(outputMgr, hits);
		   break;

	   case ContextCoverage::MEAN:
		   doMean(outputMgr, hits);
		   break;

	   case ContextCoverage::HIST:
		   doHist(outputMgr, hits);
		   break;

	   case ContextCoverage::DEFAULT:
	   default:
		   doDefault(outputMgr, hits);
		   break;

	   }

}
Пример #3
0
void doId(struct sqlConnection *conn)
/* Set up Gene Pix on given ID. */
{
int id = cartInt(cart, hgpDoId);
struct slName *genes = visiGeneGeneName(conn, id);
if (genes == NULL)
    {
    cartRemove(cart, hgpListSpec);
    cartRemove(cart, hgpId);
    }
else
    {
    cartSetInt(cart, hgpId, id);
    cartSetString(cart, hgpListSpec, genes->name);
    }
slFreeList(&genes);
doDefault(conn, FALSE);
}