Mussa aligned sequence view seems to work
[mussa.git] / alg / conserved_path.cpp
index af8af7d4ba5ae356b8775330b38d5e3ce64d1a43..a3778daae38edec6b5cc3b21139d56b3b4b80151 100644 (file)
@@ -142,6 +142,23 @@ vector<bool> ConservedPath::reverseComplimented() const
 
 }
 
+std::vector<ConservedPath::path_element> ConservedPath::normalizedIndexes() const
+{
+  vector<path_element> paths;
+  for (ConservedPath::const_iterator this_itor = begin(); 
+       this_itor != end(); 
+       ++this_itor)
+  {
+    if (*this_itor < 0) {
+      paths.push_back(-*this_itor);
+    } else {
+      paths.push_back(*this_itor);
+    }
+  }
+  return paths;
+}
+
+
 /////////////////////
 ExtendedConservedPath::ExtendedConservedPath()
   : ConservedPath(),
@@ -169,6 +186,22 @@ ExtendedConservedPath::ExtendedConservedPath(int win_size,
 {
 }
 
+std::vector<ConservedPath::path_element> ExtendedConservedPath::normalizedIndexes() const
+{
+  vector<path_element> paths;
+  for (ConservedPath::const_iterator this_itor = begin(); 
+       this_itor != end(); 
+       ++this_itor)
+  {
+    if (*this_itor < 0) {
+      paths.push_back(-(*this_itor) - window_size);
+    } else {
+      paths.push_back((*this_itor));
+    }
+  }
+  return paths;
+}
+
 ExtendedConservedPath& ExtendedConservedPath::extend(int growth)
 {
   window_size += growth;