0

I try to copy the example of mini-bowtie from the Seqan Web site. Note that the example comes from version 1.4.2, not the current one.

When I compile, I have an error. The minimal reproducible example is:

#include <seqan/index.h>
#include <seqan/store.h>

using namespace seqan;

int main()
{   
    typedef Index<StringSet<Dna5String>, FMIndex<> > TIndex;
    typedef Iterator<TIndex, TopDown<ParentLinks<> > >::Type TIter;

    FragmentStore<> fragStore;
    StringSet<Dna5String> text;

    TIndex fmIndex(text);
    TIter it(fmIndex);

    it = TIter(fmIndex); // This does not work

    return 0;
}

The compiling error is quite long. It starts with:

In file included from test.cpp:1:
In file included from /usr/include/seqan/index.h:172:
/usr/include/seqan/index/index_fm_stree.h:469:16: error: no matching constructor for initialization of 'TVertexDescriptor' (aka 'VertexFM<unsigned long, seqan::SimpleType<unsigned char, seqan::Dna5_> >')
        return TVertexDescriptor(back(it.history).range, back(it.history).repLen, back(it.history).lastChar);
               ^                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/seqan/index/index_esa_stree.h:245:27: note: in instantiation of function template specialization 'seqan::nodeUp<seqan::StringSet<seqan::String<seqan::SimpleType<unsigned char, seqan::Dna5_>,
      seqan::Alloc<void> >, seqan::Owner<seqan::Tag<seqan::Default_> > >, void, seqan::FMIndexConfig<void, unsigned long, 1, 1>, seqan::Preorder>' requested here
            _parentDesc = nodeUp(_origin);
                          ^
/usr/include/seqan/index/index_esa_stree.h:366:29: note: in instantiation of function template specialization 'seqan::Iter<seqan::Index<seqan::StringSet<seqan::String<seqan::SimpleType<unsigned char,
      seqan::Dna5_>, seqan::Alloc<void> >, seqan::Owner<seqan::Tag<seqan::Default_> > >, seqan::FMIndex<void, seqan::FMIndexConfig<void, unsigned long, 1, 1> > >, seqan::VSTree<seqan::TopDown<seqan::Preorder> >
      >::operator=<seqan::ParentLinks<seqan::Preorder> >' requested here
            *(TBase*)(this) = _origin;
                            ^
test.cpp:17:8: note: in instantiation of member function 'seqan::Iter<seqan::Index<seqan::StringSet<seqan::String<seqan::SimpleType<unsigned char, seqan::Dna5_>, seqan::Alloc<void> >,
      seqan::Owner<seqan::Tag<seqan::Default_> > >, seqan::FMIndex<void, seqan::FMIndexConfig<void, unsigned long, 1, 1> > >, seqan::VSTree<seqan::TopDown<seqan::ParentLinks<seqan::Preorder> > > >::operator='
      requested here
    it = TIter(fmIndex);
       ^

It seems that the API has slightly changed, but I cannot exactly put the finger on it.

I compile with:

clang++ -Wall -Wextra -Weffc++ -O2 -o testSeqan test.cpp -lrt

with clang++ 6.0.0-1ubuntu2 x86_64-pc-linux-gnu, but g++ Ubuntu 7.3.0-16ubuntu3 gives similar (albeit less readable) results, and Seqan version 2.3.2.

What should I change?

unamourdeswann
  • 445
  • 3
  • 14
  • 1
    incrementing the major version number usualy indicates that there have been drastic changes. Maybe the example from 1.4.2 would look completely different for 2.3.2 – 463035818_is_not_an_ai Oct 25 '18 at 13:15
  • @user463035818 Sure. But I still cannot find a workaround...This prevents me from copying the Iterator, and I find it somewhat frustrating. It is maybe impossible now? – unamourdeswann Oct 25 '18 at 13:34
  • i dont know seqan. Maybe you cannot copy `TIter` anymore. One could argue that the error message could be more clear, but otherwise I can only suggest you to look for up to date examples – 463035818_is_not_an_ai Oct 25 '18 at 13:37
  • @user463035818 Very true. This is exactly what I am doing... And I still do not know how to do. – unamourdeswann Oct 25 '18 at 13:45

0 Answers0