# all of our source files al relative to the root of our project
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
ADD_SUBDIRECTORY( alg )
+ADD_SUBDIRECTORY( gui )
ADD_SUBDIRECTORY( qui )
+
include alg/test/module.mk
include py/module.mk
include gui/module.mk
-include module.mk
# process what the module.mks defined
OBJ := $(patsubst %.cpp,%.o, $(filter %.cpp,$(SRC)))
--- /dev/null
+# recent versions of FLTK on debian have FL/Fl.H instead of Fl.h
+FIND_PATH(FLTK_INCLUDE_DIR FL/Fl.H /usr/include)
+FIND_LIBRARY(FLTK_LIBRARY fltk /usr/lib )
+
+IF(FLTK_INCLUDE_DIR)
+ SET(FLTK_FOUND 1)
+ENDIF(FLTK_INCLUDE_DIR)
+
+FIND_PACKAGE(Boost)
+
+SET(SOURCES
+ AnnotWindow.cpp
+ ConnView.cpp
+ ConnWindow.cpp
+ MotifWindow.cpp
+ mussa_fltk.cpp
+ SeqTextWindow.cpp
+ SeqView.cpp
+ SeqWindow.cpp
+ SetupWindow.cpp
+ SubAnalysisWindow.cpp
+ )
+
+IF(FLTK_FOUND)
+ ADD_EXECUTABLE(mussa_fltk WIN32 MACOSX_BUNDLE ${SOURCES})
+ LINK_DIRECTORIES(${MUSSA_BINARY_DIR}/alg)
+ TARGET_LINK_LIBRARIES(mussa_fltk
+ mussa_core
+ ${BOOST_FILESYSTEM_LIB}
+ ${FLTK_LIBRARY})
+ELSE(FLTK_FOUND)
+ MESSAGE(STATUS "Not building old FTLK version")
+ENDIF(FLTK_FOUND)
ConnView.cpp \
ConnWindow.cpp \
MotifWindow.cpp \
+ mussa_fltk.cpp \
SeqTextWindow.cpp \
SeqView.cpp \
SeqWindow.cpp \
MUSSA_FLTK_OBJ := $(MUSSA_FLTK_SRC:.cpp=$(OBJEXT))
SRC += $(MUSSA_FLTK_SRC)
-CXXFLAGS +=
+CXXFLAGS += -I$(BASEDIR)
+
+MUSSA := $(CURDIR)/mussa$(BINEXT)
+TARGETBITS += $(MUSSA)
+
+$(MUSSA): $(MUSSASRC:.cpp=$(OBJEXT)) $(MUSSA_FLTK_OBJ) $(MUSSA_ALG_OBJ)
+ g++ $(CXXFLAGS) -lfltk -o $@ $^
--- /dev/null
+// This file is part of the Mussa source distribution.
+// http://mussa.caltech.edu/
+// Contact author: Tristan De Buysscher, tristan@caltech.edu
+
+// This program and all associated source code files are Copyright (C) 2005
+// the California Institute of Technology, Pasadena, CA, 91125 USA. It is
+// under the GNU Public License; please see the included LICENSE.txt
+// file for more information, or contact Tristan directly.
+
+
+#include "gui/ConnWindow.hpp"
+#include "alg/mussa.hpp"
+#include "mussa_exceptions.hpp"
+#include <iostream>
+using namespace std;
+
+char
+parse_args(int argc, char **argv, string *a_file_path, int *window,
+ int *threshold, enum Mussa::analysis_modes *ana_mode, float *ent_thres);
+
+
+int main(int argc, char **argv)
+{
+ Mussa an_analysis;
+ string a_file_path;
+ char * picked_file;
+ int window, threshold;
+ float ent_thres;
+ char run_mode;
+ enum Mussa::analysis_modes ana_mode;
+ int x_max=1000;
+ int y_max=500;
+ string err_msg;
+
+
+ err_msg = "";
+
+ // yeah, its horrible to be passing these by reference, but I just don't see
+ // any other way without making parse_args part of MussaClass, which just
+ // seems wrong (args are after all, an io type thing, and the gui only mode
+ // will have it own way as well...
+ run_mode = parse_args(argc, argv, &a_file_path, &window, &threshold,
+ &ana_mode, &ent_thres);
+
+ cout << "mussa: run mode = " << run_mode;
+ cout << "\tfile_path = "<< a_file_path << endl;
+ cout << "mussa: ent_thres = " << ent_thres << endl;
+
+ // if no error from parse args (run_mode = 'e', ie error), run in proper mode
+ if (run_mode != 'e')
+ {
+ if ((run_mode == 'f') || (run_mode == 'n'))
+ {
+ an_analysis.load_mupa_file(a_file_path);
+ an_analysis.analyze(window, threshold, ana_mode, ent_thres);
+ //an_overlord.do_analysis();
+ }
+
+ if (run_mode == 'v')
+ an_analysis.load(a_file_path);
+ //an_overlord.get_analysis();
+
+ // no longer needed, but still semi-useful reality check...
+ if (run_mode == 'g')
+ {
+ cout << "GTV - All Gui, All the Time\n";
+ }
+
+ if (err_msg == "")
+ {
+ if ((run_mode == 'f') || (run_mode == 'v') || (run_mode == 'g'))
+ {
+ //an_overlord.spawnConnView(1000,500);
+ ConnWindow *a_conn_win = new ConnWindow(x_max, y_max, "Mussa");
+
+ // we have an analysis already if in these 2 modes
+ if ((run_mode == 'f') || (run_mode == 'v'))
+ a_conn_win->add_ana(&an_analysis);
+
+ Fl::run();
+ }
+ }
+ else
+ cout << err_msg << endl;
+ }
+}
+
+
+// minimal arg reading function, not very robust to errors
+char
+parse_args(int argc, char **argv, string *a_file_path, int *window,
+ int *threshold, enum Mussa::analysis_modes *ana_mode, float *ent_thres)
+{
+ int i, else_i;
+ string an_arg;
+ char run_mode;
+
+ // initialize these to 0 as flag if they are not changed
+ *window = 0;
+ *threshold = 0;
+ *ent_thres = 0.0;
+ run_mode = 'e'; //error default if no run mode set implicitly or explicitly
+ *ana_mode = Mussa::TransitiveNway; // default to transitivie analyses mode
+
+ // no args means gui only mode
+ if (argc == 1)
+ run_mode = 'g';
+ else
+ {
+ else_i = 0;
+ i = 1;
+ while (i < argc)
+ {
+ an_arg = * ++argv;
+ i++;
+
+ // see what alternate mode the user wants to run in
+ if (an_arg == "-m")
+ {
+ an_arg = * ++argv;
+ i++;
+ if ( (an_arg == "v") || (an_arg == "n") ) //only 2 valid modes so far
+ run_mode = an_arg[0];
+ else
+ {
+ cout << "Error: \'" << an_arg;
+ cout << "\' is not a valid analysis mode for -a argument" << endl;
+ throw cmdline_error("not valid -a argument");
+ }
+ *a_file_path = * ++argv;
+ i++;
+ }
+ // alternate analyses modes
+ else if (an_arg == "-a")
+ {
+ an_arg = * ++argv;
+ i++;
+ // t = transitive, r = radial, e = entropy
+ if (an_arg == "t") *ana_mode = Mussa::TransitiveNway;
+ else if (an_arg == "r") *ana_mode = Mussa::RadialNway;
+ else if (an_arg == "e") *ana_mode = Mussa::EntropyNway;
+ else
+ {
+ cout << "Error: \'" << an_arg;
+ cout << "\' is not a valid run mode for -m argument" << endl;
+ throw cmdline_error("bad argument -m");
+ }
+ }
+ else if (an_arg == "-w") // alternate window size arg
+ {
+ *window = atoi(* ++argv);
+ i++;
+ }
+ else if (an_arg == "-t") // alternate threshold arg
+ {
+ *threshold = atoi(* ++argv);
+ i++;
+ }
+ else if (an_arg == "-et") // alternate entropy threshold arg
+ {
+ *ent_thres = atof(* ++argv);
+ i++;
+ }
+ else
+ {
+ if (else_i == 0)
+ {
+ *a_file_path = an_arg;
+ run_mode = 'f';
+ else_i++;
+ }
+ else
+ {
+ //cout << "Error, unknown arg: \'" << an_arg << "\'" << endl;
+ cout << "Error, too many filenames: \'" << an_arg << "\'" << endl;
+ run_mode == 'e';
+ }
+ }
+ }
+ }
+ return run_mode;
+}
+
+
+/*
+ cout << "fee\n";
+ cout << "fie\n";
+ cout << "foe\n";
+ cout << "fum\n";
+*/
+++ /dev/null
-CURDIR := $(BASEDIR)
-
-SOURCES.cpp := mussa_fltk.cpp \
- #seqcomp.cxx \ #(old seqcomp)
- #mussa_nway_refine.cxx \ (broken code)
-
-MUSSASRC := $(addprefix $(CURDIR), $(SOURCES.cpp))
-
-SRC += $(MUSSASRC)
-CXXFLAGS += -I$(CURDIR)
-
-MUSSA := $(CURDIR)/mussa$(BINEXT)
-TARGETBINS += $(MUSSA)
-
-$(MUSSA): $(MUSSASRC:.cpp=$(OBJEXT)) $(MUSSA_FLTK_OBJ) $(MUSSA_ALG_OBJ)
- g++ $(CXXFLAGS) -lfltk -o $@ $^
+++ /dev/null
-// This file is part of the Mussa source distribution.
-// http://mussa.caltech.edu/
-// Contact author: Tristan De Buysscher, tristan@caltech.edu
-
-// This program and all associated source code files are Copyright (C) 2005
-// the California Institute of Technology, Pasadena, CA, 91125 USA. It is
-// under the GNU Public License; please see the included LICENSE.txt
-// file for more information, or contact Tristan directly.
-
-
-#include "gui/ConnWindow.hpp"
-#include "alg/mussa.hpp"
-#include "mussa_exceptions.hpp"
-#include <iostream>
-using namespace std;
-
-char
-parse_args(int argc, char **argv, string *a_file_path, int *window,
- int *threshold, enum Mussa::analysis_modes *ana_mode, float *ent_thres);
-
-
-int main(int argc, char **argv)
-{
- Mussa an_analysis;
- string a_file_path;
- char * picked_file;
- int window, threshold;
- float ent_thres;
- char run_mode;
- enum Mussa::analysis_modes ana_mode;
- int x_max=1000;
- int y_max=500;
- string err_msg;
-
-
- err_msg = "";
-
- // yeah, its horrible to be passing these by reference, but I just don't see
- // any other way without making parse_args part of MussaClass, which just
- // seems wrong (args are after all, an io type thing, and the gui only mode
- // will have it own way as well...
- run_mode = parse_args(argc, argv, &a_file_path, &window, &threshold,
- &ana_mode, &ent_thres);
-
- cout << "mussa: run mode = " << run_mode;
- cout << "\tfile_path = "<< a_file_path << endl;
- cout << "mussa: ent_thres = " << ent_thres << endl;
-
- // if no error from parse args (run_mode = 'e', ie error), run in proper mode
- if (run_mode != 'e')
- {
- if ((run_mode == 'f') || (run_mode == 'n'))
- {
- an_analysis.load_mupa_file(a_file_path);
- an_analysis.analyze(window, threshold, ana_mode, ent_thres);
- //an_overlord.do_analysis();
- }
-
- if (run_mode == 'v')
- an_analysis.load(a_file_path);
- //an_overlord.get_analysis();
-
- // no longer needed, but still semi-useful reality check...
- if (run_mode == 'g')
- {
- cout << "GTV - All Gui, All the Time\n";
- }
-
- if (err_msg == "")
- {
- if ((run_mode == 'f') || (run_mode == 'v') || (run_mode == 'g'))
- {
- //an_overlord.spawnConnView(1000,500);
- ConnWindow *a_conn_win = new ConnWindow(x_max, y_max, "Mussa");
-
- // we have an analysis already if in these 2 modes
- if ((run_mode == 'f') || (run_mode == 'v'))
- a_conn_win->add_ana(&an_analysis);
-
- Fl::run();
- }
- }
- else
- cout << err_msg << endl;
- }
-}
-
-
-// minimal arg reading function, not very robust to errors
-char
-parse_args(int argc, char **argv, string *a_file_path, int *window,
- int *threshold, enum Mussa::analysis_modes *ana_mode, float *ent_thres)
-{
- int i, else_i;
- string an_arg;
- char run_mode;
-
- // initialize these to 0 as flag if they are not changed
- *window = 0;
- *threshold = 0;
- *ent_thres = 0.0;
- run_mode = 'e'; //error default if no run mode set implicitly or explicitly
- *ana_mode = Mussa::TransitiveNway; // default to transitivie analyses mode
-
- // no args means gui only mode
- if (argc == 1)
- run_mode = 'g';
- else
- {
- else_i = 0;
- i = 1;
- while (i < argc)
- {
- an_arg = * ++argv;
- i++;
-
- // see what alternate mode the user wants to run in
- if (an_arg == "-m")
- {
- an_arg = * ++argv;
- i++;
- if ( (an_arg == "v") || (an_arg == "n") ) //only 2 valid modes so far
- run_mode = an_arg[0];
- else
- {
- cout << "Error: \'" << an_arg;
- cout << "\' is not a valid analysis mode for -a argument" << endl;
- throw cmdline_error("not valid -a argument");
- }
- *a_file_path = * ++argv;
- i++;
- }
- // alternate analyses modes
- else if (an_arg == "-a")
- {
- an_arg = * ++argv;
- i++;
- // t = transitive, r = radial, e = entropy
- if (an_arg == "t") *ana_mode = Mussa::TransitiveNway;
- else if (an_arg == "r") *ana_mode = Mussa::RadialNway;
- else if (an_arg == "e") *ana_mode = Mussa::EntropyNway;
- else
- {
- cout << "Error: \'" << an_arg;
- cout << "\' is not a valid run mode for -m argument" << endl;
- throw cmdline_error("bad argument -m");
- }
- }
- else if (an_arg == "-w") // alternate window size arg
- {
- *window = atoi(* ++argv);
- i++;
- }
- else if (an_arg == "-t") // alternate threshold arg
- {
- *threshold = atoi(* ++argv);
- i++;
- }
- else if (an_arg == "-et") // alternate entropy threshold arg
- {
- *ent_thres = atof(* ++argv);
- i++;
- }
- else
- {
- if (else_i == 0)
- {
- *a_file_path = an_arg;
- run_mode = 'f';
- else_i++;
- }
- else
- {
- //cout << "Error, unknown arg: \'" << an_arg << "\'" << endl;
- cout << "Error, too many filenames: \'" << an_arg << "\'" << endl;
- run_mode == 'e';
- }
- }
- }
- }
- return run_mode;
-}
-
-
-/*
- cout << "fee\n";
- cout << "fie\n";
- cout << "foe\n";
- cout << "fum\n";
-*/
+#deal with some debian wierdness
+FIND_PROGRAM(QT_QMAKE_EXECUTABLE qmake-qt4 )
+FIND_PROGRAM(QT_MOC_EXECUTABLE moc-qt4 )
+
FIND_PACKAGE(Qt4)
SET(QT_USE_QTOPENGL 1)
INCLUDE( ${QT_USE_FILE} )