void GlSeqBrowser::push_sequence(GlSequence &gs)
{
clear_links();
- pathid = 0;
track_container.push_back(gs);
update_layout();
if (track_container.size() > 1)
{
path_segments.push_back(pair_segment_map());
}
+ pathid = 0;
}
void
std::list<ConservedPath>::iterator pend() { return pathz.end() ; }
std::list<ConservedPath>::const_iterator pbegin() const { return pathz.begin() ; }
std::list<ConservedPath>::const_iterator pend() const { return pathz.end() ; }
+ size_t path_size() const { return refined_pathz.size(); }
std::list<ExtendedConservedPath>::iterator rpbegin() { return refined_pathz.begin() ; }
std::list<ExtendedConservedPath>::const_iterator rpend() const { return refined_pathz.end() ; }
std::list<ExtendedConservedPath>::const_iterator rpbegin() const { return refined_pathz.begin() ; }
std::list<ExtendedConservedPath>::iterator rpend() { return refined_pathz.end() ; }
+ size_t refined_path_size() const { return refined_pathz.size(); }
// these probably shouldn't be public, but lets start
// simple
std::list<ConservedPath> pathz;
}
}
+#include <unistd.h>
+BOOST_AUTO_TEST_CASE( nway_refine )
+{
+ Mussa m1;
+ m1.load_mupa_file( "examples/mck3test.mupa" );
+ m1.analyze(0, 0);
+ const NwayPaths& npath = m1.paths();
+ BOOST_CHECK_EQUAL (npath.path_size(), npath.refined_path_size());
+ size_t first_refined_size = npath.refined_path_size();
+ BOOST_CHECK( first_refined_size > 0 );
+
+ // we're using a window size 30 (threshold 20) example
+ m1.set_soft_thres(22);
+ m1.nway();
+ BOOST_CHECK( npath.refined_path_size() > 0);
+ BOOST_CHECK( npath.refined_path_size() < first_refined_size);
+ m1.set_soft_thres(20);
+ m1.nway();
+ BOOST_CHECK_EQUAL(npath.refined_path_size(), first_refined_size);
+}
#include "qui/MussaAlignedWindow.hpp"
#include "alg/sequence.hpp"
+#include <iostream>
using namespace std;
MussaAlignedWindow::MussaAlignedWindow(Mussa& m,
browser.setSequences(seqs, analysis->colorMapper());
updateLinks();
browser.zoomOut();
- cout << "browser zoom " << browser.zoom() << endl;
zoom.setValue(browser.zoom());
}
reversed = false;
} else {
reversed = true;
- x = -x; // make positive
+ // make positive
+ x = -x;
}
normalized_path.push_back(x);
rc_flags.push_back(reversed);