37 #ifndef OPENMS_DATASTRUCTURES_SUFFIXARRAYSEQAN_H
38 #define OPENMS_DATASTRUCTURES_SUFFIXARRAYSEQAN_H
63 typedef seqan::TopDown<seqan::ParentLinks<> >
TIterSpec;
64 typedef seqan::Index<seqan::String<char>, seqan::IndexEsa<TIterSpec> >
TIndex;
65 typedef seqan::Iter<TIndex, seqan::VSTree<TIterSpec> >
TIter;
104 void findSpec(std::vector<std::vector<std::pair<std::pair<SignedSize, SignedSize>,
DoubleReal> > > & candidates,
const std::vector<DoubleReal> & spec);
112 bool save(
const String & filename);
121 bool open(
const String & filename);
142 bool isDigestingEnd(
const char aa1,
const char aa2)
const;
149 void setTags(
const std::vector<OpenMS::String> & tags);
155 const std::vector<OpenMS::String> & getTags();
161 void setUseTags(
bool use_tags);
173 void setNumberOfModifications(
Size number_of_mods);
179 Size getNumberOfModifications();
181 void printStatistic();
276 inline void goNext_(
TIter & it,
DoubleReal & m, std::stack<DoubleReal> & allm, std::stack<std::map<DoubleReal, SignedSize> > & mod_map)
281 goNextSubTree_(it, m, allm, mod_map);
285 inline void parseTree_(
TIter & it, std::vector<std::pair<SignedSize, SignedSize> > & out_number, std::vector<std::pair<SignedSize, SignedSize> > & edge_length, std::vector<SignedSize> & leafe_depth)
292 if (length(parentEdgeLabel(it)) > 0)
294 if (countChildren(it) > 0)
296 edge_length.push_back(std::pair<SignedSize, SignedSize>(depth, length(parentEdgeLabel(it))));
304 if (countChildren(it) > 0)
306 out_number.push_back(std::pair<SignedSize, SignedSize>(depth, countChildren(it)));
310 leafe_depth.push_back(depth);
316 else if (!goRight(it))
323 edge_length.push_back(std::pair<SignedSize, SignedSize>(depth, le - length(parentEdgeLabel(it))));
327 if (isRoot(it))
return;
374 #endif //OPENMS_DATASTRUCTURES_SUFFIXARRAYSEQAN_H
A more convenient string class.
Definition: String.h:56
Class that uses SEQAN library for a suffix array. It can be used to find peptide Candidates for a MS ...
Definition: SuffixArraySeqan.h:58
bool use_tags_
if tags are used
Definition: SuffixArraySeqan.h:368
const String & s_
reference to strings for which the suffix array is build
Definition: SuffixArraySeqan.h:360
seqan::Index< seqan::String< char >, seqan::IndexEsa< TIterSpec > > TIndex
Definition: SuffixArraySeqan.h:64
seqan::Iter< TIndex, seqan::VSTree< TIterSpec > > TIter
Definition: SuffixArraySeqan.h:65
TIter * it_
seqan suffix array iterator
Definition: SuffixArraySeqan.h:338
ptrdiff_t SignedSize
Signed Size type e.g. used as pointer difference.
Definition: Types.h:151
seqan::TopDown< seqan::ParentLinks<> > TIterSpec
Definition: SuffixArraySeqan.h:63
SignedSize number_of_modifications_
number of allowed modifications
Definition: SuffixArraySeqan.h:364
void goNextSubTree_(TIter &it)
goes to the next sub tree
Definition: SuffixArraySeqan.h:241
WEIGHTMODE
Definition: WeightWrapper.h:55
Definition: WeightWrapper.h:55
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:144
std::vector< String > tags_
all tags
Definition: SuffixArraySeqan.h:366
void parseTree_(TIter &it, std::vector< std::pair< SignedSize, SignedSize > > &out_number, std::vector< std::pair< SignedSize, SignedSize > > &edge_length, std::vector< SignedSize > &leafe_depth)
Definition: SuffixArraySeqan.h:285
TIndex index_
seqan suffix array
Definition: SuffixArraySeqan.h:336
void goNext_(TIter &it, DoubleReal &m, std::stack< DoubleReal > &allm, std::stack< std::map< DoubleReal, SignedSize > > &mod_map)
overwriting goNext from seqan index_esa_stree.h for mass update during suffix array traversal ...
Definition: SuffixArraySeqan.h:276
Encapsulated weight queries to simplify mono vs average weight computation.
Definition: WeightWrapper.h:50
void goNextSubTree_(TIter &it, DoubleReal &m, std::stack< DoubleReal > &allm, std::stack< std::map< DoubleReal, SignedSize > > &mod_map)
overwriting goNextSubTree_ from seqan index_esa_stree.h for mass update during suffix array traversal...
Definition: SuffixArraySeqan.h:197
DoubleReal tol_
tolerance
Definition: SuffixArraySeqan.h:370
abstract class for suffix array
Definition: SuffixArray.h:51