示例#1
0
void doCcdsGene(struct trackDb *tdb, char *ccdsId)
/* Process click on a CCDS gene. */
{
struct sqlConnection *conn = hAllocConn(database);
struct ccdsInfo *rsCcds = ccdsInfoSelectByCcds(conn, ccdsId, ccdsInfoNcbi);
struct ccdsInfo *vegaCcds = ccdsInfoSelectByCcds(conn, ccdsId, ccdsInfoVega);
struct ccdsInfo *ensCcds = ccdsInfoSelectByCcds(conn, ccdsId, ccdsInfoEnsembl);

if (rsCcds == NULL)
    errAbort("database inconsistency: no NCBI ccdsInfo entries found for %s", ccdsId);
if ((vegaCcds == NULL) && (ensCcds == NULL))
    errAbort("database inconsistency: no Hinxton ccdsInfo entries found for %s", ccdsId);

ccdsInfoMRnaSort(&rsCcds);
ccdsInfoMRnaSort(&vegaCcds);
ccdsInfoMRnaSort(&ensCcds);

cartWebStart(cart, database, "CCDS Gene");

printf("<H2>Consensus CDS Gene %s</H2>\n", ccdsId);

writeBasicInfoHtml(conn, ccdsId, rsCcds, vegaCcds, ensCcds);
writeLinksHtml(conn, ccdsId, rsCcds, vegaCcds, ensCcds);
writePublicNotesHtml(conn, ccdsId);
writeRefSeqSummaryHtml(conn, ccdsId, rsCcds);
htmlHorizontalLine();

printTrackHtml(tdb);
ccdsInfoFreeList(&rsCcds);
ccdsInfoFreeList(&vegaCcds);
ccdsInfoFreeList(&ensCcds);
hFreeConn(&conn);
}
示例#2
0
static void createCcdsInfo(struct sqlConnection *conn, char *ccdsInfoFile,
                           struct genomeInfo *genome, struct hash* ignoreTbl,
                           struct hash *gotCcds)
/* create ccdsInfo table file */
{
verbose(2, "begin createCcdsInfo\n");
int cnt = 0, ignoreCnt = 0;
struct ccdsInfo *ccdsInfoList = loadCcdsInfoRecs(conn, genome, ignoreTbl, gotCcds, &cnt, &ignoreCnt);
ccdsFilterDupAccessions(&ccdsInfoList);
writeCcdsInfoRecs(ccdsInfoFile, ccdsInfoList);
ccdsInfoFreeList(&ccdsInfoList);
verbose(2, "end createCcdsInfo: %d processed, %d ignored, %d kept\n",
        cnt, ignoreCnt, cnt-ignoreCnt);
}