Maj terminée. Pour consulter la release notes associée voici le lien :
https://about.gitlab.com/releases/2021/07/07/critical-security-release-gitlab-14-0-4-released/

Commit 038e4146 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

kmeraffect.h: define AFFECT_{UNKNOWN,AMBIGUOUS}_SYMBOL, "_" and "?"

This was hardcoded twice in the code.
parent 1509b803
...@@ -120,9 +120,9 @@ int KmerAffect::getStrand() const{ ...@@ -120,9 +120,9 @@ int KmerAffect::getStrand() const{
string KmerAffect::getLabel() const { string KmerAffect::getLabel() const {
if (isUnknown()) if (isUnknown())
return "_"; return AFFECT_UNKNOWN_SYMBOL;
if (isAmbiguous()) if (isAmbiguous())
return "?"; return AFFECT_AMBIGUOUS_SYMBOL;
return string(1, affect_char(affect)); return string(1, affect_char(affect));
} }
......
...@@ -139,6 +139,10 @@ bool operator>=(const KmerAffect &a1, const KmerAffect &a2); ...@@ -139,6 +139,10 @@ bool operator>=(const KmerAffect &a1, const KmerAffect &a2);
bool operator!=(const KmerAffect &a1, const KmerAffect &a2); bool operator!=(const KmerAffect &a1, const KmerAffect &a2);
ostream &operator<<(ostream &os, const KmerAffect &kmer); ostream &operator<<(ostream &os, const KmerAffect &kmer);
#define AFFECT_AMBIGUOUS_SYMBOL "?"
#define AFFECT_UNKNOWN_SYMBOL "_"
/** /**
* Constant defining the unknown affectation (not known yet) * Constant defining the unknown affectation (not known yet)
*/ */
......
...@@ -676,15 +676,12 @@ int main (int argc, char **argv) ...@@ -676,15 +676,12 @@ int main (int argc, char **argv)
///////////////////////////////////////// /////////////////////////////////////////
if (command == CMD_GERMLINES) if (command == CMD_GERMLINES)
{ {
#define KMER_AMBIGUOUS "?"
#define KMER_UNKNOWN "_"
map <char, int> stats_kmer, stats_max; map <char, int> stats_kmer, stats_max;
IKmerStore<KmerAffect> *index = multigermline->index ; IKmerStore<KmerAffect> *index = multigermline->index ;
// Initialize statistics, with two additional categories // Initialize statistics, with two additional categories
index->labels.push_back(make_pair(KmerAffect::getAmbiguous(), KMER_AMBIGUOUS)); index->labels.push_back(make_pair(KmerAffect::getAmbiguous(), AFFECT_AMBIGUOUS_SYMBOL));
index->labels.push_back(make_pair(KmerAffect::getUnknown(), KMER_UNKNOWN)); index->labels.push_back(make_pair(KmerAffect::getUnknown(), AFFECT_UNKNOWN_SYMBOL));
for (list< pair <KmerAffect, string> >::const_iterator it = index->labels.begin(); it != index->labels.end(); ++it) for (list< pair <KmerAffect, string> >::const_iterator it = index->labels.begin(); it != index->labels.end(); ++it)
{ {
......
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