Commit 15866913 authored by Mathieu Giraud's avatar Mathieu Giraud

core/kmeraffect.{h,cpp}: remove 'kmer' argument to Kmer, KmerAffect and...

core/kmeraffect.{h,cpp}: remove 'kmer' argument to Kmer, KmerAffect and KmerStringAffect constructors

This argument was not used.
(Les Aubrais)
parent 15fd21d2
...@@ -75,7 +75,7 @@ KmerAffect::KmerAffect(const KmerAffect &ka) { ...@@ -75,7 +75,7 @@ KmerAffect::KmerAffect(const KmerAffect &ka) {
affect = ka.affect; affect = ka.affect;
} }
KmerAffect::KmerAffect(const string &kmer, const string &label, KmerAffect::KmerAffect(const string &label,
int strand) { int strand) {
affect.c = label[0]; affect.c = label[0];
if (strand == 1) if (strand == 1)
...@@ -177,7 +177,7 @@ KmerStringAffect::KmerStringAffect(const KmerStringAffect &ksa): ...@@ -177,7 +177,7 @@ KmerStringAffect::KmerStringAffect(const KmerStringAffect &ksa):
label(ksa.label),strand(ksa.strand){} label(ksa.label),strand(ksa.strand){}
KmerStringAffect::KmerStringAffect(const string &kmer, const string &label, KmerStringAffect::KmerStringAffect(const string &label,
int strand) { int strand) {
this->label = label; this->label = label;
this->strand = strand; this->strand = strand;
......
...@@ -69,7 +69,7 @@ public: ...@@ -69,7 +69,7 @@ public:
* Construct an affectation as stated by the parameters * Construct an affectation as stated by the parameters
* @post affect_strand(affect) == strand AND affect_char(affect) == kmer[0] * @post affect_strand(affect) == strand AND affect_char(affect) == kmer[0]
*/ */
KmerAffect(const string &kmer, const string &label="", int strand=1); KmerAffect(const string &label, int strand=1);
/** /**
* Add another affectation to the current one. * Add another affectation to the current one.
* @post The current affectation is not modified if the parameter is the same * @post The current affectation is not modified if the parameter is the same
...@@ -142,17 +142,17 @@ ostream &operator<<(ostream &os, const KmerAffect &kmer); ...@@ -142,17 +142,17 @@ ostream &operator<<(ostream &os, const KmerAffect &kmer);
/** /**
* Constant defining the unknown affectation (not known yet) * Constant defining the unknown affectation (not known yet)
*/ */
const KmerAffect AFFECT_UNKNOWN = KmerAffect("", "\0", 0); const KmerAffect AFFECT_UNKNOWN = KmerAffect("\0", 0);
/** /**
* Constant defining the ambiguous affectation (many possibilities) * Constant defining the ambiguous affectation (many possibilities)
*/ */
const KmerAffect AFFECT_AMBIGUOUS = KmerAffect("", "\1", 1); const KmerAffect AFFECT_AMBIGUOUS = KmerAffect("\1", 1);
const KmerAffect AFFECT_V = KmerAffect("", "V", 1); const KmerAffect AFFECT_V = KmerAffect("V", 1);
const KmerAffect AFFECT_J = KmerAffect("", "J", 1); const KmerAffect AFFECT_J = KmerAffect("J", 1);
const KmerAffect AFFECT_V_BWD = KmerAffect("", "V", -1); const KmerAffect AFFECT_V_BWD = KmerAffect("V", -1);
const KmerAffect AFFECT_J_BWD = KmerAffect("", "J", -1); const KmerAffect AFFECT_J_BWD = KmerAffect("J", -1);
//////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////
...@@ -176,7 +176,7 @@ public: ...@@ -176,7 +176,7 @@ public:
* Construct an affectation as stated by the parameters * Construct an affectation as stated by the parameters
* @post affect_strand(affect) == strand AND affect_char(affect) == kmer[0] * @post affect_strand(affect) == strand AND affect_char(affect) == kmer[0]
*/ */
KmerStringAffect(const string &kmer, const string &label="", int strand=1); KmerStringAffect(const string &label, int strand=1);
/** /**
* Add another affectation to the current one. * Add another affectation to the current one.
* @post The current affectation is not modified if the parameter is the same * @post The current affectation is not modified if the parameter is the same
...@@ -244,6 +244,6 @@ bool operator>=(const KmerStringAffect &k1, const KmerStringAffect &k2); ...@@ -244,6 +244,6 @@ bool operator>=(const KmerStringAffect &k1, const KmerStringAffect &k2);
ostream &operator<<(ostream &os, const KmerStringAffect &kmer); ostream &operator<<(ostream &os, const KmerStringAffect &kmer);
const KmerStringAffect KSA_UNKNOWN = KmerStringAffect(); const KmerStringAffect KSA_UNKNOWN = KmerStringAffect();
const KmerStringAffect KSA_AMBIGUOUS = KmerStringAffect("", "", 2); const KmerStringAffect KSA_AMBIGUOUS = KmerStringAffect("", 2);
#endif #endif
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
Kmer::Kmer():count(0) {} Kmer::Kmer():count(0) {}
Kmer::Kmer(const string &kmer, const string &label, int strand) { Kmer::Kmer(const string &label, int strand) {
count = 1; count = 1;
} }
......
...@@ -20,7 +20,7 @@ public: ...@@ -20,7 +20,7 @@ public:
/** /**
* This constructor is used via a IKmerStore<Kmer> index (hence the argument list) * This constructor is used via a IKmerStore<Kmer> index (hence the argument list)
*/ */
Kmer(const seqtype &kmer, const string &label="", int strand=1); Kmer(const string &label, int strand=1);
Kmer &operator+=(const Kmer &); Kmer &operator+=(const Kmer &);
static bool hasRevcompSymetry(); static bool hasRevcompSymetry();
...@@ -171,7 +171,7 @@ void IKmerStore<T>::insert(Fasta& input, ...@@ -171,7 +171,7 @@ void IKmerStore<T>::insert(Fasta& input,
insert(input.sequence(r), label); insert(input.sequence(r), label);
} }
labels.push_back(make_pair(T("", label, 1), label)) ; labels.push_back(make_pair(T(label, 1), label)) ;
} }
template<class T> template<class T>
...@@ -187,10 +187,10 @@ void IKmerStore<T>::insert(const seqtype &sequence, ...@@ -187,10 +187,10 @@ void IKmerStore<T>::insert(const seqtype &sequence,
kmer = rc_kmer; kmer = rc_kmer;
} }
} }
this->get(kmer) += T(kmer, label, strand); this->get(kmer) += T(label, strand);
if (revcomp_indexed && ! T::hasRevcompSymetry()) { if (revcomp_indexed && ! T::hasRevcompSymetry()) {
seqtype rc_kmer = revcomp(kmer); seqtype rc_kmer = revcomp(kmer);
this->get(rc_kmer) += T(rc_kmer, label, -1); this->get(rc_kmer) += T(label, -1);
} }
} }
} }
......
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