+ MussaRef mussa = Mussa::init();
+
+ int fastaIndex;
+ int start;
+ int end;
+
+ list<SetupInfo *> setupInfoList = seqSetupFrame->getSetupInfo();
+
+ for (list<SetupInfo *>::reverse_iterator setup_item = setupInfoList.rbegin();
+ setup_item != setupInfoList.rend();
+ ++setup_item)
+ {
+ std::string seqName = (*setup_item)->getName();
+ std::string seqNative = (*setup_item)->getSeqFile();
+ std::string annotNative = (*setup_item)->getAnnotFile();
+ fastaIndex = (*setup_item)->getFastaIndex();
+ start = (*setup_item)->getSubSeqStart();
+ end = (*setup_item)->getSubSeqEnd();
+
+ fs::path seqFile(seqNative, fs::native);
+ fs::path annotFile(annotNative, fs::native);
+ mussa->load_sequence(seqFile, annotFile, fastaIndex, start, end, &seqName);
+ }
+ setupInfoList.clear();
+
+ int win_size = windowEdit->value();
+ int threshold = thresholdEdit->value();
+ std::string name = analysisNameLineEdit->text().toStdString();
+ if (win_size == 0 or threshold == 0) {
+ throw mussa_load_error("must set analysis parameters");
+ } else {
+ mussa->set_name(name);
+ mussa->set_window(win_size);
+ mussa->set_threshold(threshold);
+ mussa->set_analysis_mode(Mussa::TransitiveNway);
+ //mussa->set_entropy(0); // might want to add this at some point
+ mussa->analyze();
+ }
+
+ return mussa;