Ejemplo n.º 1
0
void embPatlistSeqSearch (AjPFeattable ftable, const AjPSeq seq,
			  AjPPatlistSeq plist, AjBool reverse)
{
    AjPPatternSeq patseq = NULL;
    AjPPatComp compPat;

    ajDebug ("embPatlistSearchListSeq: Searching '%S' for %d patterns\n",
	     ajSeqGetNameS(seq), ajPatlistSeqGetSize(plist));

    while (ajPatlistSeqGetNext(plist,&patseq))
    {
        compPat = ajPatternSeqGetCompiled(patseq);

	if (!compPat && !embPatternSeqCompile(patseq))
        {
            ajPatlistSeqRemoveCurrent(plist);
            continue;
        }

        embPatternSeqSearch(ftable,seq,patseq,reverse);
        ajDebug("end loop\n");
    }

    ajPatlistSeqRewind(plist);

    return;
}
Ejemplo n.º 2
0
ajuint ajPatlistSeqDoc (AjPPatlistSeq plist, AjPStr* Pdoc)
{
    AjPPatternSeq pat = NULL;

    ajFmtPrintS(Pdoc, "%-12s %8s %s\n",
		   "Pattern_name", "Mismatch", "Pattern");
    while (ajPatlistSeqGetNext(plist, &pat))
    {
	ajFmtPrintAppS(Pdoc, "%-12S %8d %S\n",
		       ajPatternSeqGetName(pat),
		       ajPatternSeqGetMismatch(pat),
		       ajPatternSeqGetPattern(pat));
    }
    return ajListGetLength(plist->Patlist);
}