a_file_path = file_path_base + ".muway";
//cout << " loading museq: " << a_file_path << endl;
the_paths.load(a_file_path);
+ // perhaps this could be more elegent, but at least this'll let
+ // us know what our threshold and window sizes were when we load a muway
+ window = the_paths.get_window();
+ threshold = the_paths.get_threshold();
+ soft_thres = threshold;
int seq_num = the_paths.sequence_count();
soft_thres = sft_thres;
}
+int NwayPaths::get_threshold() const
+{
+ return threshold;
+}
+
+int NwayPaths::get_window() const
+{
+ return win_size;
+}
// dumbly goes thru and combines path windows exactly adjacent (ie + 1 index)
// doesn't deal with interleaved adjacency
void setup(int w, int t);
void setup_ent(double new_entropy_thres, std::vector<std::string> some_Seqs);
void set_soft_thres(int soft_thres);
+ //! return minimum threshold for this analysis
+ int get_threshold() const;
+ //! return window size used for this analysis
+ int get_window() const;
void radiate_path_search(std::vector<std::vector<FLPs> > all_comparisons);
void trans_path_search(std::vector<std::vector<FLPs> > all_comparisons);
m1.analyze(0, 0);
BOOST_CHECK( m1.size() > 0);
+ BOOST_CHECK_EQUAL( m1.get_window(), 30 );
+ BOOST_CHECK_EQUAL( m1.get_threshold(), 20);
+}
+
+BOOST_AUTO_TEST_CASE( mussa_load_analysis )
+{
+ Mussa m1;
+ chdir( "examples" );
+ const int bufsize = 1024;
+ char path_buf[bufsize];
+ getcwd(path_buf, bufsize);
+ std::string base_path(path_buf);
+ chdir( ".." );
+ m1.load_mupa_file( base_path + "/mck3test.mupa" );
+ m1.analyze(0, 0);
+
+ Mussa m2;
+ m2.load(base_path + "/mck3test_w30_t20");
+
+ BOOST_CHECK_EQUAL( m1.size(), m2.size() );
+ BOOST_CHECK_EQUAL( m1.get_window(), m2.get_window() );
+ BOOST_CHECK_EQUAL( m1.get_threshold(), m2.get_threshold() );
}
BOOST_AUTO_TEST_CASE( mussa_load_motif )
mussaViewTB.addWidget(&zoomBox);
connect(&zoomBox, SIGNAL(valueChanged(int)),
&browser, SLOT(setZoom(int)));
-
- threshold.setRange(10,30);
- threshold.setThreshold(20);
+
+ // threshold range is set in updateAnalysis
+
//scene->setClipPlane(20);
// FIXME: for when we get the paths drawn at the appropriate depth
//connect(&threshold, SIGNAL(thresholdChanged(int)),
void MussaWindow::updateAnalysis()
{
- cout << "analysis updated" << endl;
+ threshold.setRange(analysis->get_threshold(),analysis->get_window());
+ threshold.setThreshold(analysis->get_threshold());
for (list<MussaAlignedWindow *>::iterator maw_i = aligned_windows.begin();
maw_i != aligned_windows.end();
++maw_i)