static void singlequerymatchspacedseed(Limdfsresources *limdfsresources, const AbstractDfstransformer *dfst, const GtUchar *query, GtUword querylen, const Spacedseed *spse) { const GtUchar *qptr; GtUword offset, skipvalue; if (spse->seedwidth > querylen) { return; } qptr = query; offset = 0; while (qptr <= query + querylen - spse->seedwidth) { skipvalue = containsspecialbytestring(qptr,offset,spse->seedwidth); if (skipvalue == spse->seedwidth) { offset = spse->seedwidth-1; singlewindowmatchspacedseed(limdfsresources,dfst,qptr,spse); qptr++; } else { offset = 0; qptr += (skipvalue+1); } } }
static void singleseqtyrsearch(const Tyrindex *tyrindex, const Tyrcountinfo *tyrcountinfo, const Tyrsearchinfo *tyrsearchinfo, const Tyrbckinfo *tyrbckinfo, uint64_t unitnum, const GtUchar *query, unsigned long querylen, GT_UNUSED const char *desc) { const GtUchar *qptr, *result; unsigned long offset, skipvalue; if (tyrsearchinfo->mersize > querylen) { return; } qptr = query; offset = 0; while (qptr <= query + querylen - tyrsearchinfo->mersize) { skipvalue = containsspecialbytestring(qptr,offset,tyrsearchinfo->mersize); if (skipvalue == tyrsearchinfo->mersize) { offset = tyrsearchinfo->mersize-1; if (tyrsearchinfo->searchstrand & STRAND_FORWARD) { result = gt_searchsinglemer(qptr,tyrindex,tyrsearchinfo,tyrbckinfo); if (result != NULL) { mermatchoutput(tyrindex, tyrcountinfo, tyrsearchinfo, result, query, qptr, unitnum, true); } } if (tyrsearchinfo->searchstrand & STRAND_REVERSE) { gt_assert(tyrsearchinfo->rcbuf != NULL); gt_copy_reversecomplement(tyrsearchinfo->rcbuf,qptr, tyrsearchinfo->mersize); result = gt_searchsinglemer(tyrsearchinfo->rcbuf,tyrindex, tyrsearchinfo,tyrbckinfo); if (result != NULL) { mermatchoutput(tyrindex, tyrcountinfo, tyrsearchinfo, result, query, qptr, unitnum, false); } } qptr++; } else { offset = 0; qptr += (skipvalue+1); } } }