Re: [Seqan-dev] SwiftPattern reinit required


Hi Fabian,

> I made another observation that seems 
> strange. I run swift on a bunch of sequences (Finder). However, only the 
> first sequence will ever get a match.
> Looking at you swiftlocal app I see that you call
> 
> Pattern<TQGramIndex, Swift<SwiftLocal> > pattern_swift(index_qgram);
> 
> in the inner loop. This probably resets something in the object that is 
> crucial to the program. I was wondering if it wouldn't make sense to 
> "reuse" the already instantiated object and "just" reset what ever 
> required? Or is there a special reason to do it this way? I think it 
> used to work (with seqan release 1.2). 

Yes, one needed to re-initialize the pattern. Reusing the object was only possible with the semi-global version until now. But as I planned to have a look at it soon anyway, I now fixed it for the local version.

> The swiftlocal app currently 
> doesn't compile so I couldn't just give it a go and try what happens 
> when the line mentioned above is initialized outside the loop.

Normally, it should compile. I recently moved the file from the demos folder to the apps folder. Have you updated all files to the current version?

Cheers, 
Birte