[project @ 10]
authorDiane Trout <diane@caltech.edu>
Wed, 21 Sep 2005 23:18:36 +0000 (23:18 +0000)
committerDiane Trout <diane@caltech.edu>
Wed, 21 Sep 2005 23:18:36 +0000 (23:18 +0000)
mussa010

14 files changed:
Makefile
annot_test.cc [new file with mode: 0644]
mussa.cc
mussa_class.cc
mussa_class.hh
mussa_gui_conn_view.cc
mussa_gui_conn_window.cc
mussa_gui_conn_window.hh
mussa_gui_load_window.hh [new file with mode: 0644]
mussa_gui_seq.cc
mussa_gui_seq_view.cc
mussa_gui_seq_view.hh
mussa_test.cc [new file with mode: 0644]
sequence.cc

index c9e9962e9124907c59f23a78a00b378715431328..ffc52ce7e044ffd2ad0becba6674c5b73d505b76 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -67,6 +67,9 @@ mussa_gui_seq.o : mussa_gui_seq.cc mussa_gui_seq.hh
 mussa_gui_motif_window.o : mussa_gui_motif_window.cc mussa_gui_motif_window.hh
        $(CC) $(CFLAGS) -c mussa_gui_motif_window.cc
 
+mussa_gui_load_window.o : mussa_gui_load_window.cc mussa_gui_load_window.hh
+       $(CC) $(CFLAGS) -c mussa_gui_load_window.cc
+
 mussa_gui_conn_view.o : mussa_gui_conn_view.cc mussa_gui_conn_view.hh
        $(CC) $(CFLAGS) -O -c mussa_gui_conn_view.cc
 
@@ -76,12 +79,12 @@ mussa_gui_conn_window.o : mussa_gui_conn_window.cc mussa_gui_conn_window.hh
 mussa : sequence.o flp.o flp_seqcomp.o \
                mussa_nway.o mussa_nway_other.o mussa_class.o \
                mussa_gui_seq.o mussa_gui_seq_view.o \
-               mussa_gui_motif_window.o \
+               mussa_gui_motif_window.o mussa_gui_load_window.o \
                mussa_gui_conn_view.o mussa_gui_conn_window.o \
                mussa.cc  
        $(CC) $(CFLAGS) -o mussa mussa.cc \
                mussa_gui_conn_view.o mussa_gui_conn_window.o \
-               mussa_gui_motif_window.o \
+               mussa_gui_motif_window.o mussa_gui_load_window.o \
                mussa_gui_seq.o mussa_gui_seq_view.o \
                mussa_class.o mussa_nway.o mussa_nway_other.o \
                flp_seqcomp.o flp.o sequence.o $(LDFLAGS)
diff --git a/annot_test.cc b/annot_test.cc
new file mode 100644 (file)
index 0000000..1df5a86
--- /dev/null
@@ -0,0 +1,23 @@
+#include "sequence.hh"
+
+int main(int argc, char **argv) 
+{
+  Sequence seqA;
+  char * seqA_file, * seqA_annot;
+  cout << "fee fie foe fum" << endl;
+
+
+  seqA_file = * ++argv;
+  seqA_annot = * ++argv;
+
+  seqA.load_fasta(seqA_file, 1);
+  seqA.load_annot(seqA_annot);
+  //seqA_len = seqA.len();
+}
+
+/*
+      cout << "fee\n";
+      cout << "fie\n";
+      cout << "foe  ";
+      cout << "fum\n";
+*/
index 25c83ddf2fd8da0ba0321855955b8654ceb9a27e..bd13249abb7372b7872e7edd8f44493fe1b0b4e2 100644 (file)
--- a/mussa.cc
+++ b/mussa.cc
@@ -73,8 +73,11 @@ int main(int argc, char **argv)
   run_mode = parse_args(argc, argv, &a_file_path, &window, &threshold);
 
   if ((run_mode == 'f') || (run_mode == 'n'))
-    err_msg = an_analysis.analyze(a_file_path, window, threshold);
+  {
+    err_msg = an_analysis.load_mupa_file(a_file_path);
+    err_msg = an_analysis.analyze(window, threshold);
     //an_overlord.do_analysis();
+  }
 
   if  (run_mode == 'v')
     err_msg = an_analysis.load(a_file_path);
index f1ab4f08241fe2f313c89f674b773ea2d0fd4dba..cc7e6191a8f47f5b18f76658b6b055d80c4d8016 100644 (file)
@@ -5,6 +5,7 @@
 #include "mussa_class.hh"
 
 // doesn't do neg ints...
+// should get rid of and replace int to str needs with string stream stuff...
 string
 int_to_str(int an_int)
 {
@@ -52,9 +53,63 @@ Mussa::Mussa()
 {
 }
 
+// set all parameters to null state
+void
+Mussa::clear()
+{
+  ana_name = "";
+  seq_num = 0;
+  window = 0;
+  threshold = 0;
+  win_append = false;
+  thres_append = false;
+  seq_files.clear();
+  fasta_indices.clear();
+  annot_files.clear();
+  sub_seq_starts.clear();
+  sub_seq_ends.clear();
+}
+
+// these 5 simple methods manually set the parameters for doing an analysis
+// used so that the gui can take input from user and setup the analysis
+// note - still need a set_append(bool, bool) method...
+void
+Mussa::set_name(string a_name)
+{
+  ana_name = a_name;
+}
+
+void
+Mussa::set_seq_num(int a_num)
+{
+  seq_num = a_num;
+}
+
+void
+Mussa::set_window(int a_window)
+{
+  window = a_window;
+}
+
+void
+Mussa::set_threshold(int a_threshold)
+{
+  threshold = a_threshold;
+}
+
+// sets info for just 1 seq at a time
+void
+Mussa::set_seq_info(string seq_file, string annot_file, int fa_i, int a_start,                      int the_end)
+{
+  seq_files.push_back(seq_file);
+  fasta_indices.push_back(fa_i);
+  annot_files.push_back(annot_file);
+  sub_seq_starts.push_back(a_start);
+  sub_seq_ends.push_back(the_end);
+}
 
 string
-Mussa::load_parameters(string para_file_path)
+Mussa::load_mupa_file(string para_file_path)
 {
   ifstream para_file;
   string file_data_line;
@@ -67,13 +122,7 @@ Mussa::load_parameters(string para_file_path)
 
 
   // initialize values
-  win_append = false;
-  thres_append = false;
-  seq_files.clear();
-  fasta_indices.clear();
-  annot_files.clear();
-  sub_seq_starts.clear();
-  sub_seq_ends.clear();
+  clear();
 
   para_file.open(para_file_path.c_str(), ios::in);
 
@@ -178,7 +227,7 @@ Mussa::load_parameters(string para_file_path)
 
 
 string
-Mussa::analyze(string para_file_path, int w, int t)
+Mussa::analyze(int w, int t)
 {
   string err_msg;
   time_t t1, t2, begin, end;
@@ -187,18 +236,19 @@ Mussa::analyze(string para_file_path, int w, int t)
 
   begin = time(NULL);
 
-  t1 = time(NULL);
-  err_msg = load_parameters(para_file_path);
-  t2 = time(NULL);
-  setuptime = difftime(t2, t1);
+  // now loading parameters from file must be done separately
+  //t1 = time(NULL);
+  //err_msg = load_mupa_file(para_file_path);
+  //t2 = time(NULL);
+  //setuptime = difftime(t2, t1);
 
   if (w > 0)
     window  = w;
   if (t > 0)
     threshold = t;
 
-  if (err_msg == "")
-  {
+  //if (err_msg == "")
+  //{
     cout << "fee\n";
     t1 = time(NULL);
     err_msg = get_Seqs();
@@ -231,8 +281,10 @@ Mussa::analyze(string para_file_path, int w, int t)
       end = time(NULL);
       totaltime = difftime(end, begin);
 
-      cout << "setup\tseqload\tseqcomp\tnway\tsave\ttotal\n";
-      cout << setuptime << "\t"; 
+
+      cout << "seqload\tseqcomp\tnway\tsave\ttotal\n";
+      //setup\t
+      //cout << setuptime << "\t"; 
       cout << seqloadtime << "\t";
       cout << seqcomptime << "\t";
       cout << nwaytime << "\t";
@@ -241,9 +293,9 @@ Mussa::analyze(string para_file_path, int w, int t)
     }
     else
       return err_msg;
-  }
-  else
-    return err_msg;
+  //}
+  //else
+  //return err_msg;
 }
 
 
@@ -255,6 +307,7 @@ Mussa::get_Seqs()
   Sequence aSeq;
   string err_msg;
 
+
   seq_files_i = seq_files.begin();
   fasta_indices_i = fasta_indices.begin();
   annot_files_i = annot_files.begin();
index ad41b665d9501968e363951169cc534c4a11daa3..fdabcee78f21549b24ed67446eb6a2dd1764fdc7 100644 (file)
@@ -14,8 +14,8 @@ class Mussa
   friend class ConnWindow;
 
   private:
-  // Private variables
-  //string para_file_path;
+    // Private variables
+    // parameters needed for a mussa analysis
     string ana_name;
     int seq_num, window, threshold;
     list<string> seq_files, annot_files;
@@ -23,26 +23,44 @@ class Mussa
     bool win_override, thres_override;
     bool win_append, thres_append;
 
+    // sequence data
     vector<Sequence> the_Seqs;
+    // the seqcomp data
     vector<vector<FLPs> > all_comps;
+    // N-way data, ie the mussa results  
     Nway_Paths the_paths;
 
 
-  // Private methods
-    string load_parameters(string para_file_path);
+    // Private methods
     string get_Seqs();
     void seqcomp();
     void nway();
 
 
   public:
-    Mussa();
-    string analyze(string para_file_path, int w, int t);
+    Mussa();  
+
+    // parameters need to be set before calling this
+    // w & t are for command line override functionality, set to 0 to ignore
+    string analyze(int w, int t);
     void save();
     string load(string ana_file);
 
-  // deprecated - support bridge for python version of mussa
-  // these save & load from the old file format
+    // clear parameters and initialize data lists
+    void clear();
+
+    // set parameters from a file - 'mupa' ~ mussa parameters
+    string load_mupa_file(string para_file_path);
+
+    // set parameters individually (eg from user input into gui classes)
+    void set_name(string a_name);
+    void set_seq_num(int a_num);
+    void set_window(int a_window);
+    void set_threshold(int a_threshold);
+    void set_seq_info(string seq_file, string annot_file, int fa_i, int a_start,                      int the_end);
+
+    // deprecated - support bridge for python version of mussa
+    // these save & load from the old file format
     void save_old();
     void load_old(char * load_file_path, int s_num);
 };
index 4c7c9b2fe4d2748652c9ffb63b5c17bdd69461c0..549342e4369806a180a8ca301d398e2f2d5a6360 100644 (file)
@@ -504,13 +504,13 @@ ConnView::check_new_motifs()
     {
       cout << i->seq << " is new\n";
       i->locations.clear();
-      //i_locs = i->locations
+      //i_locs = i->locations;
       for(i2 = 0; i2 < seq_num; i2++)
       {
         some_motif_locs = (*S)[i2].find_motif(i->seq);
         (*i).locations.push_back(some_motif_locs);
 
-       /*
+       
         i_locs = some_motif_locs.begin();
         while (i_locs != some_motif_locs.end())
         {
@@ -518,7 +518,7 @@ ConnView::check_new_motifs()
           ++i_locs;
         }
         cout << endl;
-       */
+       
       }
 
       i->dirty = false;
index 05de8aa8e780ecbb14f0afc3d012a81e969d2bbe..a94faa8c8d0c1d108d16a945b6e2dbf30e442f89 100644 (file)
@@ -29,6 +29,9 @@ ConnWindow::real_load_ana_cb()
 
   if (err_msg == "")
   {
+    // relabel window with the analysis name
+    window_name = "Mussa: " + an_analysis->ana_name;
+    label((const char*)window_name.c_str());
     // show the user the analysis
     conn_box->setup(an_analysis->ana_name, an_analysis->seq_num, 
                     an_analysis->window, &(an_analysis->the_Seqs), 
@@ -60,12 +63,20 @@ ConnWindow::real_do_ana_cb()
 
   picked_file = fl_file_chooser("Analysis Config File", "", "", 1);
   a_file_path = picked_file;
+
   an_analysis = new Mussa();
-  err_msg = an_analysis->analyze(a_file_path, 0, 0);
+  err_msg = an_analysis->load_mupa_file(a_file_path);
+
+  if (err_msg == "")
+  {
+    err_msg = an_analysis->analyze(0, 0);
+  }
 
   if (err_msg == "")
   {
+    // relabel window with the analysis name
+    window_name = "Mussa: " + an_analysis->ana_name;
+    label((const char*)window_name.c_str());
     // show the user the analysis
     conn_box->setup(an_analysis->ana_name, an_analysis->seq_num, 
                     an_analysis->window, &(an_analysis->the_Seqs), 
@@ -79,6 +90,33 @@ ConnWindow::real_do_ana_cb()
   }
 }
 
+void
+setup_ana_cb(Fl_Button* o, void* v)
+{
+  ConnWindow* T=(ConnWindow*)v;
+  T->real_setup_ana_cb();
+}
+
+void
+ConnWindow::real_setup_ana_cb()
+{
+  an_analysis = new Mussa();
+  setup_win = new SetupWindow(650,700,"Analysis Setup", an_analysis);
+
+  while(setup_win->visible())
+    Fl::wait(.1);
+  cout << "Like a warm summer day\n";
+
+  // relabel window with the analysis name
+  window_name = "Mussa: " + an_analysis->ana_name;
+  label((const char*)window_name.c_str());
+  // is it this easy?  what if setup window encounters an error...??
+  conn_box->setup(an_analysis->ana_name, an_analysis->seq_num, 
+                 an_analysis->window, &(an_analysis->the_Seqs), 
+                 &(an_analysis->the_paths));
+  cout << "Like a warm day in may\n";
+  conn_box->scale_paths();
+}
 
 // all the crap needed for dealing with the scale bars
 void
@@ -160,6 +198,7 @@ ConnWindow::ConnWindow(int w, int h, const char* title):
   color(FL_WHITE);
   resizable(this);
 
   // create file menu button
   file_menu = new Fl_Menu_Button(padding, 2, button_len, 30, "File");
   file_menu->color(FL_WHITE,a_color);
@@ -169,6 +208,7 @@ ConnWindow::ConnWindow(int w, int h, const char* title):
   // add menu items
   file_menu->add("Do Analysis", 0, (Fl_Callback *) do_ana_cb, this);
   file_menu->add("Load Analysis", 0, (Fl_Callback *) load_ana_cb, this);
+  file_menu->add("Setup Analysis", 0, (Fl_Callback *) setup_ana_cb, this);
 
   toggle_divs = new Fl_Button(padding+button_len, 2, button_len, 30, "Toggle Bars");
   toggle_divs->color(FL_WHITE,a_color);
@@ -189,10 +229,11 @@ ConnWindow::ConnWindow(int w, int h, const char* title):
   line_input->value("");
   line_input->when(FL_WHEN_ENTER_KEY);
   line_input->callback((Fl_Callback*)set_line_len_cb, this);
-
 
   // create the connections box
   conn_box = new ConnView(padding, padding + 30, w-2*padding, h-2*padding-30);
+  //conn_box = new ConnView(padding, padding, w-2*padding, h-2*padding);
 
   end();
   show();
index c091e22108abf18469c77fe3fccf2ac253b313cb..5bad92b8d58638dcefc29763bfc1a04dd8669845 100644 (file)
@@ -1,5 +1,4 @@
 #include "mussa_gui_conn_view.hh"
-#include <FL/Fl_File_Chooser.H>
 #include <FL/fl_ask.H>
 
 
@@ -14,8 +13,9 @@ class ConnWindow : public Fl_Double_Window
     Fl_Button *toggle_lines;
     Fl_Input *line_input;
     ConnView *conn_box;
+    SetupWindow *setup_win;
     int padding, name_pad;
-
+    string window_name;
 
   public:
     ConnWindow(int w, int h, const char* title);
@@ -24,6 +24,7 @@ class ConnWindow : public Fl_Double_Window
 
     void real_load_ana_cb();
     void real_do_ana_cb();
+    void real_setup_ana_cb();
     void real_toggle_bars_cb();
     void real_set_bar_len_cb(Fl_Input* o);
     void real_toggle_lines_cb();
diff --git a/mussa_gui_load_window.hh b/mussa_gui_load_window.hh
new file mode 100644 (file)
index 0000000..e8b20ed
--- /dev/null
@@ -0,0 +1,62 @@
+#include "mussa_gui_motif_window.hh"
+#include <FL/Fl_File_Chooser.H>
+#include <FL/Fl_Scroll.H>
+
+class SetupWindow : public Fl_Window
+{ 
+  public:
+    SetupWindow(int w, int h, const char* title, Mussa *an_analysis);
+    ~SetupWindow();
+
+    Fl_Button* test;
+
+    Fl_Input *name_input;
+    Fl_Input *win_input;
+    Fl_Input *thres_input;
+    Fl_Input *seq_num_input;
+    Fl_Scroll *seq_scroll;
+    // need to keep track of these so a browsed file search can set the input
+    // fields to teh selected file
+    vector<Fl_Input*> seq_inputs, annot_inputs;
+
+
+    // callback receiver functions
+
+    void real_do_analysis();
+
+    void real_set_ana_name_cb(Fl_Input* o);
+    void real_set_win_size_cb(Fl_Input* o);
+    void real_set_threshold_cb(Fl_Input* o);
+    void real_set_seq_num_cb(Fl_Input* o);
+
+    void real_seq_file_in_cb(Fl_Input* o, int i);
+    void real_choose_seq_file_cb(int i);
+    void real_annot_file_in_cb(Fl_Input* o, int i);
+    void real_choose_annot_file_cb(int i);
+
+    void real_fa_index_in_cb(Fl_Input* o, int i);
+    void real_sub_start_in_cb(Fl_Input* o, int i);
+    void real_sub_end_in_cb(Fl_Input* o, int i);
+
+  private:
+    Mussa *an_analysis;
+    string ana_name;
+    int window, threshold, seq_num;
+    vector<string> seq_files, annot_files;
+    vector<int> fasta_indices, sub_seq_starts, sub_seq_ends;
+    bool win_append, thres_append;
+
+    static void print_cb(Fl_Button*, void*);
+    inline void print_cb_real(Fl_Button*, void*);
+
+    void add_seq_input(int index);
+};
+
+// crazy whacked shite Titus taught me to do to get an index value associated
+// with each instance of an input associated with the callback... 
+
+struct seq_data_instance
+{
+  SetupWindow * sw_ptr;
+  int index;
+};
index 1d73b6230540352696a8a677062a657880983dce..a41f4b57e0bb83e21fe0c514d0edffe49588be6d 100644 (file)
@@ -104,6 +104,7 @@ SeqWinMaster::real_toggle_motifs_cb()
 void
 SeqWinMaster::make_window()
 {
+  string window_name;
   menu_align_data_bundle * some_menu_data;
 
   vector<int> a_path;
@@ -113,8 +114,9 @@ SeqWinMaster::make_window()
   string align_id_string;
   list<vector<int> >::iterator align_iter;
 
+  window_name = "Mussa Sequence: " + ana_name;
   Fl_Double_Window *seq_window = new Fl_Double_Window(x_max, y_max,
-                                                      "Mussa Sequence");
+                                        (const char*) window_name.c_str());
   //seq_window->resizable();
   seq_window->color(FL_WHITE);
   seq_window->begin();
index ee7a874dfa62be7f7faf5d85316d4cdd5b57782e..d0c58f14b937f24d7b084234346825e47b40820b 100644 (file)
@@ -121,9 +121,14 @@ SeqView::draw_motifs(double ch_width)
       {
         x_start = (int) ((*i_locs +scroll_offset - seq_align_offsets[i2]) 
                          * ch_width) + index_pad + x();
-        fl_line(x_start,y_loc,x_start+scale_len,y_loc);
+
+       //cout << *i_locs << ":" << x_start << " ";
+       // don't draw highlights outside of box range, they can wraparound past some boundry
+       if ((x_start > 0) && (x_start < w()))
+         fl_line(x_start,y_loc,x_start+scale_len,y_loc);
         ++i_locs;
       }
+      //cout << endl;
     y_loc += y_seq_incre;      
     }
     ++motif_i;
@@ -392,6 +397,8 @@ SeqView::align_offsets(int align_num)
       // for testing purposes: to see everything in the short test sequences
       //seq_align_offsets.push_back(0);
     }
+    // reset any dragging done, otherwise might be hard to find selected align
+    scroll_offset = 0;
   }
 }
 
index 4a7d738c76d618bce4e4c47066d7f6d9dda9a128..c7644a3b77b8f6e751e02c1a3d93da479f562334 100644 (file)
@@ -1,4 +1,4 @@
-#include "mussa_gui_motif_window.hh"
+#include "mussa_gui_load_window.hh"
 
 #include <math.h>
 #include <FL/Fl_Box.H>
diff --git a/mussa_test.cc b/mussa_test.cc
new file mode 100644 (file)
index 0000000..13b4021
--- /dev/null
@@ -0,0 +1,94 @@
+#include "mussa_class.hh"
+#include "time.h"
+
+int main(int argc, char **argv) 
+{
+  Mussa overlord;
+  char * para_file, * ana_file;
+  string  an_arg;
+  time_t t1, t2, begin, end;
+  double setuptime, seqloadtime, seqcomptime, nwaytime, savetime, totaltime;
+  string run_mode;
+  int seq_num;
+
+
+  begin = time(NULL);
+
+  // need more sophisticated arg reading structure
+  // support -w and -t override options...other stuff??
+  an_arg = * ++argv;
+
+  if (an_arg == "-v")
+  {
+    ana_file = * ++argv;
+    run_mode = "v";
+  }
+  else
+  {
+    para_file = (char*) an_arg.c_str();
+    run_mode = "f";
+  }
+
+  if (run_mode == "v")
+  {
+    cout << "load file = " << ana_file << endl;
+    overlord.load(ana_file);
+    //overlord.FuckingPieceOfShit(1000,500);
+  }
+  else if (run_mode == "f")
+  {
+    t1 = time(NULL);
+    overlord.setup(para_file);
+    t2 = time(NULL);
+    setuptime = difftime(t2, t1);
+
+
+    cout << "fee\n";
+    t1 = time(NULL);
+    overlord.get_Seqs();
+    t2 = time(NULL);
+    seqloadtime = difftime(t2, t1);
+
+
+    cout << "fie\n";
+    t1 = time(NULL);
+    overlord.seqcomp();
+    t2 = time(NULL);
+    seqcomptime = difftime(t2, t1);
+
+
+    cout << "foe\n";
+    t1 = time(NULL);
+    overlord.nway();
+    t2 = time(NULL);
+    nwaytime = difftime(t2, t1);
+
+
+    cout << "fum\n";
+    t1 = time(NULL);
+    overlord.save_old();
+    t2 = time(NULL);
+    savetime = difftime(t2, t1);
+
+    end = time(NULL);
+    totaltime = difftime(end, begin);
+
+    cout << "setup\tseqload\tseqcomp\tnway\tsave\ttotal\n";
+    cout << setuptime << "\t"; 
+    cout << seqloadtime << "\t";
+    cout << seqcomptime << "\t";
+    cout << nwaytime << "\t";
+    cout << savetime << "\t";
+    cout << totaltime << "\n";
+  }
+}
+
+
+
+
+/*
+      cout << "fee\n";
+      cout << "fie\n";
+      cout << "foe\n";
+      cout << "fum\n";
+*/
index b27f7f6a3bbdf413fa7e05f5aa0374c6dc514efd..cc1eede22b5d9494abb77d74f672f49bd676eb1f 100644 (file)
@@ -527,10 +527,14 @@ Sequence::motif_scan(string a_motif, vector<int> * motif_match_starts)
 
   motif_i = 0;
 
+  cout << "motif: " << a_motif << endl;
+
   //cout << "length: " << length << endl;
   seq_i = 0;
   while (seq_i < length)
   {
+    //if ((seq_i > 10885) && (seq_i < 10917))
+    //cout << seq_c[seq_i] << "?" << a_motif[motif_i] << ":" << motif_i << " ";
     // this is pretty much a straight translation of Nora's python code
     // to match iupac letter codes
     if (a_motif[motif_i] =='N')
@@ -571,6 +575,7 @@ Sequence::motif_scan(string a_motif, vector<int> * motif_match_starts)
              ((seq_c[seq_i]=='C') || (seq_c[seq_i]=='G') ||
               (seq_c[seq_i]=='T')))
       motif_i++;
+
     else
     {
       seq_i -= motif_i;
@@ -580,11 +585,13 @@ Sequence::motif_scan(string a_motif, vector<int> * motif_match_starts)
     // end Nora stuff, now we see if a match is found this pass
     if (motif_i == motif_len)
     {
-      //cout << "MATCH!!!\n";
+      //cout << "!!";
       motif_match_starts->push_back(seq_i - motif_len + 1);
       motif_i = 0;
     }
 
     seq_i++;
   }
+  cout << endl;
 }
+