Re: [Seqan-dev] usage of setStepSize
Hi Johannes,
the way you use setStepSize is absolutely right. It was a bug in the q-gram index construction, fixed in [10554].
http://trac.mi.fu-berlin.de/seqan/changeset/10554
Thanks for reporting,
David
Am 06.10.2011 um 14:42 schrieb Johannes Merkle:
> Hi,
>
> I'm experiencing some odd behaviour when using the q-gram-index with a
> different stepsize.
> The attached code (which is very similar to your tutorial, only with the
> added setStepSize command and the OpenAddressing spec) returns wrong
> results (0 and 7). Without the OpenAddressing spec it doesn't work at
> all (see attached error message).
>
> Am i using the setStepSize command incorrect or is this a bug?
>
> Thanks,
> Johannes
>
>
>
> Code:
> typedef Index<DnaString, IndexQGram< UngappedShape<3>, OpenAddressing >
>> TIndex;
> TIndex index("CATGATTACATA");
> setStepSize(index,2);
> hash(indexShape(index), "CAT");
> for (unsigned i = 0; i < length(getOccurrences(index,
> indexShape(index))); ++i)
> std::cout << getOccurrences(index, indexShape(index))[i] <<
> std::endl;
>
> Error Message:
> ...SeqAn\core\include\seqan/sequence/string_base.h:227 Assertion failed
> : static_cast<TStringPos>(pos) < static_cast<TStringPos>(length(me))
> was: 254 >= 65 (Trying to access an element behind the last one!)
>
> _______________________________________________
> seqan-dev mailing list
> seqan-dev@lists.fu-berlin.de
> https://lists.fu-berlin.de/listinfo/seqan-dev