: color_mapper(new AnnotationColors)
{
clear();
- connect(&the_paths, SIGNAL(progress(const std::string&, int, int)),
- this, SIGNAL(progress(const std::string&, int, int)));
+ connect(&the_paths, SIGNAL(progress(const QString&, int, int)),
+ this, SIGNAL(progress(const QString&, int, int)));
}
Mussa::Mussa(const Mussa& m)
analysis_path(m.analysis_path),
dirty(m.dirty)
{
- connect(&the_paths, SIGNAL(progress(const std::string&, int, int)),
- this, SIGNAL(progress(const std::string&, int, int)));
+ connect(&the_paths, SIGNAL(progress(const QString&, int, int)),
+ this, SIGNAL(progress(const QString&, int, int)));
+}
+
+MussaRef Mussa::init()
+{
+ boost::shared_ptr<Mussa> m(new Mussa());
+ return m;
}
boost::filesystem::path Mussa::get_analysis_path() const
}
-const vector<boost::shared_ptr<Sequence> >&
+const vector<SequenceRef>&
Mussa::sequences() const
{
return the_seqs;
analysis_path = ana_file;
analysis_name = ana_path.leaf();
- file_path_base = ana_path.branch_path() / analysis_name;
- a_file_path = file_path_base / (analysis_name + ".muway");
+ fs::path muway(analysis_name+".muway", fs::native);
+ a_file_path = analysis_path / muway;
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
int seq_num = the_paths.sequence_count();
- a_file_path = file_path_base / (analysis_name + ".museq");
+ fs::path museq(analysis_name + ".museq", fs::native);
+ a_file_path = analysis_path / museq;
// this is a bit of a hack due to C++ not acting like it should with files
for (i = 1; i <= seq_num; i++)
the_seqs.push_back(tmp_seq);
}
- fs::path motif_file = file_path_base / (analysis_name + ".mtl");
+ fs::path mtl(analysis_name + ".mtl", fs::native);
+ fs::path motif_file = analysis_path / mtl;
if (fs::exists(motif_file)) {
load_motifs(motif_file);
}
append_info.str("");
append_info << analysis_name << "_sp_" << i << "v" << i2 << ".flp";
//clog << append_info.str() << endl;
- a_file_path = file_path_base / append_info.str();
- //clog << "path " << a_file_path.string() << endl;
+ fs::path flp(append_info.str(), fs::native);
+ a_file_path = analysis_path / flp;
all_comps[i][i2].load(a_file_path);
- //clog << "real size = " << all_comps[i][i2].size() << endl;
}
}
}
-
void
Mussa::save_old()
{
void Mussa::load_motifs(std::istream &in)
{
std::string data;
- const char *alphabet = Alphabet::nucleic_cstr;
+ const char *alphabet = Alphabet::dna_cstr;
motif_parser::ParsedMotifs parsed_motifs(motif_sequences, color_mapper);
// slurp our data into a string