Commit d278970d authored by Mathieu Giraud's avatar Mathieu Giraud

core/kmerstore.h: .getLabel(), returns label stored for an affectation

parent 2b94220c
......@@ -109,6 +109,12 @@ public:
*/
string getSeed() const;
/**
* @param kmer: a kmer
* @return one label associated with the kmer
*/
string getLabel(T kmer) const;
/**
* @param seq: a sequence
* @param no_revcomp: force not to revcomp the sequence, even if
......@@ -293,6 +299,13 @@ string IKmerStore<T>::getSeed() const {
return seed;
}
template<class T>
string IKmerStore<T>::getLabel(T kmer) const {
for (typename list< pair<T, string> >::const_iterator it = labels.begin(); it != labels.end(); ++it)
if (it->first == kmer)
return it->second ;
return "" ;
}
// .getResults()
template<class T>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment