turn color back on
authorDiane Trout <diane@caltech.edu>
Sat, 20 May 2006 01:51:14 +0000 (01:51 +0000)
committerDiane Trout <diane@caltech.edu>
Sat, 20 May 2006 01:51:14 +0000 (01:51 +0000)
reimplemnt some code to try and compute coloring things that are
reverse complimented with respect to their previous sequence as blue.

Also there was a bug in my previous patch for computing the aligned paths
where paths that partially had matched through a few of the n-way sequences
would still be added to the list of matches. (now something has to
match all the way through before being added)

alg/glseqbrowser.cpp
alg/mussa.cpp

index ae9ed776eae1ba6f6fe5a289b31e4cf8119a387a..f8a7b8c694834905c28ca9e4f634d4429f4581d1 100644 (file)
@@ -353,8 +353,9 @@ GlSeqBrowser::link(const vector<int>& path, const vector<bool>& rc, int )
             y1 -= track_container[track_i].height()/2;
       float y2 = track_container[track_i+1].y();
             y2 += track_container[track_i+1].height()/2;
-            
-      Segment s(prev_x, y1, *path_i, y2, prev_rc);
+      
+      bool rcFlag = (prev_rc or *rc_i) and !(prev_rc and *rc_i);
+      Segment s(prev_x, y1, *path_i, y2, rcFlag);
       s.path_ids.insert(pathid);
       path_segments[track_i][p] = s;
     } else {
@@ -511,11 +512,10 @@ void GlSeqBrowser::draw_segments() const
           glColor3f(1.0, 0.8, 0.8);
         }
       } else { 
-        // hack for demo, hide the reverse compliment color bug
         if (selected_paths.size() == 0 or selected.size() > 0) {
-          glColor3f(1.0, 0.0, 0.0);
+          glColor3f(0.0, 0.0, 1.0);
         } else {
-          glColor3f(1.0, 0.8, 0.8);
+          glColor3f(0.8, 0.8, 1.0);
         }
         /*
         if (selected_paths.size() == 0 or selected.size() > 0) {
index 768dcdd85ca5653ef621f6413a8344275b7064d8..9efe35adf5781b48f0ff405336e80ddd7eac0101 100644 (file)
@@ -229,7 +229,7 @@ void Mussa::createLocalAlignment(std::list<ConservedPath>::iterator begin,
       if (full_match)
         aligned_path.push_back(x_end);
 
-      if (aligned_path.size() > 0) {
+      if (aligned_path.size() == a_path.size()) {
         result.push_back(aligned_path);
         reversed.push_back(rc_list);
       }