Exemple #1
0
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);
}
Exemple #2
0
void doGenePredSequence(struct sqlConnection *conn)
/* Output genePred sequence. */
{
char *type = cartString(cart, hgtaGeneSeqType);

if (sameWord(type, "protein"))
    {
    if (doGalaxy() && !cgiOptionalString(hgtaDoGalaxyQuery))
        sendParamsToGalaxy(hgtaDoGenePredSequence, "submit");
    else
        doGenePredNongenomic(conn, 1);
    }
else if (sameWord(type, "mRNA"))
    {
    if (doGalaxy() && !cgiOptionalString(hgtaDoGalaxyQuery))
        sendParamsToGalaxy(hgtaDoGenePredSequence, "submit");
    else
        doGenePredNongenomic(conn, 2);
    }
else
    genomicFormatPage(conn);
}