Example #1
0
static void getAligns(struct sqlConnection *conn, struct hash *refSeqVerInfoTbl, char *outFile)
/* get request alignments from database */
{
struct psl *psls = pslReaderLoadQuery(conn, "refSeqAli", NULL);
slSort(psls, pslCmpQuery);
FILE *fh = mustOpen(outFile, "w");
struct psl *psl;
for (psl = psls; psl != NULL; psl = psl->next)
    processPsl(fh, refSeqVerInfoTbl, psl);
carefulClose(&fh);
pslFreeList(&psls);
}
Example #2
0
void gbGeneTblRebuild(struct gbGeneTbl *ggt, struct gbStatus* status,
                      struct sqlConnection *conn)
/* rebuild a gene from an alignment that is already loaded in a table */
{
char where[128];
sqlSafefFrag(where, sizeof(where), "qName = \"%s\"", status->acc);
struct psl *psls = pslReaderLoadQuery(conn, ggt->alnTbl, where);
struct psl *psl;
for (psl = psls; psl != NULL; psl = psl->next)
    gbGeneTblWrite(ggt, status, psl, conn);
pslFreeList(&psls);
}