projects
/
mussa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5a26388
)
break the core of add_motifs loop into a seperate function
author
Diane Trout
<diane@caltech.edu>
Thu, 29 Jun 2006 01:16:00 +0000
(
01:16
+0000)
committer
Diane Trout
<diane@caltech.edu>
Thu, 29 Jun 2006 01:16:00 +0000
(
01:16
+0000)
alg/mussa.cpp
patch
|
blob
|
history
alg/mussa.hpp
patch
|
blob
|
history
diff --git
a/alg/mussa.cpp
b/alg/mussa.cpp
index 79078b2cb1447b3ba4c2ca46d0a3500116fc2337..2391b0478080863d196271df6d1204e04d175787 100644
(file)
--- a/
alg/mussa.cpp
+++ b/
alg/mussa.cpp
@@
-710,6
+710,12
@@
Mussa::load_old(char * load_file_path, int s_num)
//the_paths.save("tmp.save");
}
//the_paths.save("tmp.save");
}
+void Mussa::add_motif(const string& motif, const Color& color)
+{
+ motif_sequences.insert(motif);
+ color_mapper->appendInstanceColor("motif", motif, color);
+}
+
void Mussa::add_motifs(const vector<string>& motifs,
const vector<Color>& colors)
{
void Mussa::add_motifs(const vector<string>& motifs,
const vector<Color>& colors)
{
@@
-719,8
+725,7
@@
void Mussa::add_motifs(const vector<string>& motifs,
for(size_t i = 0; i != motifs.size(); ++i)
{
for(size_t i = 0; i != motifs.size(); ++i)
{
- motif_sequences.insert(motifs[i]);
- color_mapper->appendInstanceColor("motif", motifs[i], colors[i]);
+ add_motif(motifs[i], colors[i]);
}
update_sequences_motifs();
}
}
update_sequences_motifs();
}
diff --git
a/alg/mussa.hpp
b/alg/mussa.hpp
index 25663494bd339091f9056a07d920ec58b0d6cf6d..73070050327d407ac84b65beeba7a377d969f961 100644
(file)
--- a/
alg/mussa.hpp
+++ b/
alg/mussa.hpp
@@
-143,6
+143,8
@@
public:
void load_old(char * load_file_path, int s_num);
// manage motif lists
void load_old(char * load_file_path, int s_num);
// manage motif lists
+ void add_motif(const std::string& motifs,
+ const Color& colors);
//! add vector of motifs and colors to our motif collection
/*! this depends on sets and color maps being unique
* (aka if you add the same item more than once it doesn't
//! add vector of motifs and colors to our motif collection
/*! this depends on sets and color maps being unique
* (aka if you add the same item more than once it doesn't