"run an analysis defined by the mussa parameter file")
("view-analysis", po::value<std::string>(),
"load a previously run analysis")
+ ("no-gui", "terminate without running an analysis")
;
po::variables_map vm;
else if (vm.count("view-analysis")) {
m->load( vm["view-analysis"].as< std::string >() );
}
- return m;
+ if (vm.count("no-gui")) {
+ return 0;
+ } else {
+ return m;
+ }
}
.add_property("analysisMode", &Mussa::get_analysis_mode,
&Mussa::set_analysis_mode)
.add_property("analysisModeName", &Mussa::get_analysis_mode_name)
- .def("analyze", &Mussa::analyze)
+ .def("analyze", &Mussa::analyze, "Run the analysis")
.def("paths", &Mussa::paths, return_internal_reference<>())
//.def("sequences", &Mussa::sequences)
.def("addSequence", &Mussa::add_a_seq) ;
{
class_<Sequence>("Sequence")
.def(init<std::string>())
- //.add_property("seq", &Sequence::get_seq, &Sequence::set_seq)
+ .def("__str__", &Sequence::get_seq)
.def("size", &Sequence::size)
.def("__len__", &Sequence::size)
//.add_property("header", &Sequence::get_header)
void MussaAlignedWindow::computeMatchLines()
{
- const vector<Sequence>& raw_sequence = analysis.sequences();
+ const vector<Sequence>& raw_seq = analysis.sequences();
vector<int> aligned_path;
size_t i2, i3;
int x_start, x_end;
// RC case handling
// ugh, and xor...only want rc coloring if just one of the nodes is rc
// if both nodes are rc, then they are 'normal' relative to each other
- if ( ( rc_list[i2] || rc_list[i2+1] ) &&
- !(rc_list[i2] && rc_list[i2+1] ) )
+ if((rc_list[i2] || rc_list[i2+1] )&&!(rc_list[i2] && rc_list[i2+1]))
{ //the hideous rc matching logic - not complex, but annoying
- if ( !( ( (raw_sequence[i2][x_start] == 'A') &&
- (raw_sequence[i2+1][x_end] == 'T') ) ||
- ( (raw_sequence[i2][x_start] == 'T') &&
- (raw_sequence[i2+1][x_end] == 'A') ) ||
- ( (raw_sequence[i2][x_start] == 'G') &&
- (raw_sequence[i2+1][x_end] == 'C') ) ||
- ( (raw_sequence[i2][x_start] == 'C') &&
- (raw_sequence[i2+1][x_end] == 'G') ) ) )
+ if(!(( (raw_seq[i2][x_start]=='A')&&(raw_seq[i2+1][x_end]=='T')) ||
+ ((raw_seq[i2][x_start]=='T')&&(raw_seq[i2+1][x_end]=='A')) ||
+ ((raw_seq[i2][x_start]=='G')&&(raw_seq[i2+1][x_end]=='C')) ||
+ ((raw_seq[i2][x_start]=='C')&&(raw_seq[i2+1][x_end]=='G'))) )
full_match = false;
}
else
{
- if (!( (raw_sequence[i2][x_start] == raw_sequence[i2+1][x_end]) &&
- (raw_sequence[i2][x_start] != 'N') &&
- (raw_sequence[i2+1][x_end] != 'N') ) )
+ if (!( (raw_seq[i2][x_start] == raw_seq[i2+1][x_end]) &&
+ (raw_seq[i2][x_start] != 'N') &&
+ (raw_seq[i2+1][x_end] != 'N') ) )
full_match = false;
}
}