Re: [Seqan-dev] Trouble Using Custom SeedSpec


Hey Brett, 

first you have to specify seed sets as SeedSet<Simple>, that’s why your code is not compiling.
Unfortunately this is also a bug (see: https://github.com/seqan/seqan/issues/731), as the seed set can not be specialised with the customisations made to the seeds.
Currently the seed set always takes the default seed configuration disregarding the custom one.

We will fix this for the new release 2.0.0.

Thanks for detecting this.

cheers,

René

On 25 Nov 2014, at 02:57, Brett Bowman <bnbowman@gmail.com> wrote:

The algorithm I'm trying to implement with SeqAn (1.4.1) uses log-probabilities as scores, so I need to customize the Seed<> to change the default ScoreValue type:

"""
// Declare our Seed Config and associated Seed type
struct SeedConfig
{
    typedef size_t TPosition;
    typedef MakeSigned_<size_t>::Type TDiagonal;
    typedef size_t TSize;
    typedef float TScoreValue;   // Changed to Float to be compatible with existing scoring scheme
};

typedef Seed<Simple, SeedConfig> TSeed;
typedef SeedSet<SeedConfig> TSeedSet;
"""

But when I try to add seeds to my SeedSet, 
"""
TSeed seed = TSeed(queryPos, refPos, 12);
float score = 15.5;
setScore(seed, score);
std::cout << seed << " " << seqan::score(seed) << " " << score << std::endl;
 
if (!addSeed(seeds, seed, 0, Merge()))
{
     addSeed(seeds, seed, Single());
}
"""

I get the following error no matter what I try:
"""
/home/bbowman/git/SRSLI/src/C++/SparseAlignment.hpp:220:18: error: no matching function for call to 'addSeed'
            if (!addSeed(seeds, seed, 0, Merge()))
                 ^~~~~~~
/usr/include/seqan/seeds/seeds_seed_set_unordered.h:361:1: note: candidate function [with TSeedSpec = SeedConfig, TDistanceThreshold = int] not viable: no known conversion from
      'Seed<Simple, struct SeedConfig>' to 'const Seed<struct SeedConfig, (default) struct seqan::DefaultSeedConfig>' for 2nd argument
addSeed(SeedSet<TSeedSpec, Unordered> & seedSet,
"""

What am I missing?

Sincerely,
Brett
_______________________________________________
seqan-dev mailing list
seqan-dev@lists.fu-berlin.de
https://lists.fu-berlin.de/listinfo/seqan-dev

---

René Rahn
Ph.D. Student
--------------------------------
Tel:  (+49) 30 838 75277
--------------------------------
Institute of Computer Science
Algorithmic Bioinformatics (ABI)
--------------------------------
Freie Universität Berlin
Takustraße 9
14195 Berlin
--------------------------------