mussa.git
16 years agoattach annotations property to seq_span
Diane Trout [Thu, 6 Sep 2007 23:29:13 +0000 (23:29 +0000)]
attach annotations property to seq_span

16 years agomake annotations sequenceable from python
Diane Trout [Thu, 6 Sep 2007 22:44:54 +0000 (22:44 +0000)]
make annotations sequenceable from python
e.g. l = [ x for x in mussa.annotations("value")
returns [('name', 'value')

16 years agobasic wrapping of Annotations
Diane Trout [Wed, 5 Sep 2007 01:41:39 +0000 (01:41 +0000)]
basic wrapping of Annotations
this provides at least basic member access for my annotations class,
it unfortunately doesn't properly handle iteratation yet though.

16 years agomore work on seq_span
Diane Trout [Tue, 4 Sep 2007 22:35:50 +0000 (22:35 +0000)]
more work on seq_span
One problem that showed up was that if a SeqSpan is created on the stack,
the parent shared pointer wont work, so any subseqs will crash.

To fix that at the python layer I had to add a factory function that
proprely dynamically created a SeqSpan.

I tried to get the parent call to work but that kept returning a new object
which makes the python is function unhappy.

16 years agotranslate KeyError too
Diane Trout [Thu, 30 Aug 2007 22:41:01 +0000 (22:41 +0000)]
translate KeyError too
unfortunately the template register_exception_handler had trouble with
function overloading of the translate functions, so I needed to name
each exception translator differently.

16 years agoStart wrapping seq_span
Diane Trout [Wed, 29 Aug 2007 05:43:49 +0000 (05:43 +0000)]
Start wrapping seq_span
there were a couple of challanges. First off the stl_container_adapter I
was using didn't handle returning a const_reference particularly well,
so I had to add a get_const function.

The other was more insideous, the example the wiki had showed just setting
the python exception, it didn't generate a C++ exception. So when
boost::python tried to copy an undefined reference when it fell of
the end of a container I got a bus error.

The solution was to add in a C++/Python exception translater so I threw
a C++ exception indicating an IndexError, but then the it was transformed
into the appropriate Python exception.

16 years agoadd prototype wrapping of the qt sequence browser
Diane Trout [Sat, 25 Aug 2007 00:33:05 +0000 (00:33 +0000)]
add prototype wrapping of the qt sequence browser
having two boost::python modules caused some python import problems
so i merged the gui code into the mussa python extension module.

Unfortunately it's a serious pain to create the right objects to be passed
to the browser for it to render anything. I need to switch the browser
to use the seqspans with drawables on them.

16 years agocheck for per python version libboost_python library
Diane Trout [Fri, 17 Aug 2007 19:33:49 +0000 (19:33 +0000)]
check for per python version libboost_python library
Ok, so this probably isn't useful for anyone but me yet, as I hacked
boost-cmake to add the python version number to libboost_python .

Though I will try to get boost.python to include it in the main branch.

16 years agoBoost unit test 1.34.1 needs an extra define
Diane Trout [Tue, 29 Jan 2008 02:16:42 +0000 (02:16 +0000)]
Boost unit test 1.34.1 needs an extra define
The 1.33.1 version aparently tried to include main() in a shared
library, which is aparently doesn't work on every platform. So they
needed to add a macro which would expand in to a main() for
auto test cases.

16 years agoProperites -> Properties spelling err fix.
Brandon King [Fri, 19 Oct 2007 18:49:36 +0000 (18:49 +0000)]
Properites -> Properties spelling err fix.
 * Reported by Erich Schwarz.

16 years agoHACKISH: Display chipseq peak window track
Brandon King [Fri, 10 Aug 2007 21:12:28 +0000 (21:12 +0000)]
HACKISH: Display chipseq peak window track
 * Displays chipseq peak windows when annotation is
   of type 'chipseq_peak_window'.
 * FIXME: A more proper implementation will be needed
   in the future.

16 years agoremove excess cout call
Diane Trout [Fri, 3 Aug 2007 01:49:56 +0000 (01:49 +0000)]
remove excess cout call

16 years agomake the mupa parser more robust
Diane Trout [Fri, 3 Aug 2007 01:38:30 +0000 (01:38 +0000)]
make the mupa parser more robust
ticket:268
improved mupa parser

16 years agoadd threshold/window flag getter/setters
Diane Trout [Fri, 3 Aug 2007 01:37:57 +0000 (01:37 +0000)]
add threshold/window flag getter/setters

16 years agominor updates to mussa setup widget
Diane Trout [Fri, 3 Aug 2007 01:35:01 +0000 (01:35 +0000)]
minor updates to mussa setup widget
I was trying to get mussa to build against qt 4.3.0 which and this component
had some display issues (which I wasn't able to resolve on OS X)
these updates remove the trailing blank space that was needed for qt 4.2.2
on windows (at least I think it was that version) and wrapped most
of the display strings in the tr() so we could localize mussa if we
wanted to.

16 years agoupdate to 4.2.3
Diane Trout [Fri, 3 Aug 2007 01:33:08 +0000 (01:33 +0000)]
update to 4.2.3

16 years agoUse the right return type
Diane Trout [Fri, 29 Jun 2007 21:44:01 +0000 (21:44 +0000)]
Use the right return type
Makes a type conversion warning go away.

17 years agotest paircomp::NwayComparison
Diane Trout [Fri, 5 Jan 2007 23:46:48 +0000 (23:46 +0000)]
test paircomp::NwayComparison
this does require paircomp revision 110 from
http://svn.idyll.org/svn/t/cartwheel/branches/diane/paircomp
if you're using paircomp.

Mussa will only try to build paircomp if there's a mussa/paircomp
directory.

16 years agoCatch annotation sequences that don't end with newline
Diane Trout [Sat, 23 Jun 2007 00:46:45 +0000 (00:46 +0000)]
Catch annotation sequences that don't end with newline
ticket:265
for some unknown reason if the last sequence in an annotation file
wasn't terminated by a new line, spirit ended up duplicating the
last character. Needless to say this meant that it wouldn't always
align properly.

I installed a hack into push_back_seq::operator() that checks for
this condition and removes the duplicated character if the bug was
triggered.

Needless to say if spirit (or my grammar) gets fixed and this bug goes
away the hack will need to be removed. I think the sequence equality
tessts in test_sequence::sequence_no_trailing_newline should trip if
the last character doesn't get duplicated.

Also I didn't test what happens if a location based sequence doesn't
end with a newline.

16 years agotest annotating a sequence with fasta records in a stream
Diane Trout [Thu, 21 Jun 2007 00:52:58 +0000 (00:52 +0000)]
test annotating a sequence with fasta records in a stream
I split the load_annot function int one that opens the file and
one that reads the stream. (which is called by the file handling one)

This was so I could test some random sequence that Steven was having
trouble with. (which seems to be working correctly.)

16 years agoFindBoost.cmake boost 1.34 Windows mingw patch
Brandon King [Tue, 22 May 2007 22:30:49 +0000 (22:30 +0000)]
FindBoost.cmake boost 1.34 Windows mingw patch

16 years agotry to update for boost 1.34
Diane Trout [Tue, 22 May 2007 21:23:06 +0000 (21:23 +0000)]
try to update for boost 1.34
I really need a better way of searching for all the different types of boost
names.

16 years agofactor out viewport to display scaling functions
Diane Trout [Wed, 2 May 2007 23:55:57 +0000 (23:55 +0000)]
factor out viewport to display scaling functions

17 years agosimplify zoom code
Diane Trout [Thu, 26 Apr 2007 04:18:23 +0000 (04:18 +0000)]
simplify zoom code
while describing my first stab at trying to simplify Brandons code to brandon
I mentioned the magic word "log" scaling. Which after some digging in
the depths of my memory produced a useful function for more simply scaling
the scroll wheel.

17 years agoaccept and ignore events
Diane Trout [Thu, 26 Apr 2007 04:07:34 +0000 (04:07 +0000)]
accept and ignore events
aparently when doing event processing in Qt you need to accept events
you handled.

17 years agoPyQt compatible Python wrapping using SIP
Brandon King [Thu, 12 Apr 2007 22:31:03 +0000 (22:31 +0000)]
PyQt compatible Python wrapping using SIP
  * First successful attempt at wrapping a mussagl Qt Widget in a way
that makes it compatible with PyQt.
  * Currently Wrapped:
    * MussaSetupDialog

17 years agoMouse scroll wheel zooming! =o)
Brandon King [Mon, 23 Apr 2007 17:11:12 +0000 (17:11 +0000)]
Mouse scroll wheel zooming! =o)
 * ticket:252
 * MussaWindow & MussaAlignedWindows now zoom when using the mouse wheel.
 * SequenceBrowser emits mouseWheelZoom(double) when mouse whell use
   is detected.
 * SequenceBrowserWidget perculates the mouseWheelZoom(double) signal upward.
   * If you need to act on new mouse wheel zoom, you can connect to the
     signal at the SequenceBrowserWidget level.
 * Zoom automatically adjusts increment when switching form 1.0, 0.1, 0.01
   levels for smooth zooming.

17 years agodont draw sequence box when we can see sequence text
Diane Trout [Sat, 21 Apr 2007 01:17:40 +0000 (01:17 +0000)]
dont draw sequence box when we can see sequence text
my new draw_track code didn't test to see if the sequence text was visible
thus hiding the text. This fixes that, though at the cost of adding
more logic in the process of rendering the display.

17 years ago * New line chars at EOF (missed one)
Brandon King [Fri, 20 Apr 2007 01:09:12 +0000 (01:09 +0000)]
 * New line chars at EOF (missed one)
   * Magically make warnings disapear.
   * ticket:263.

17 years agoNew line chars at EOF.
Brandon King [Fri, 20 Apr 2007 01:03:05 +0000 (01:03 +0000)]
New line chars at EOF.
 * Magically make warnings disapear.
 * ticket:263.

17 years agoLoad saved muway and set to muways soft threshold.
Brandon King [Fri, 20 Apr 2007 00:29:17 +0000 (00:29 +0000)]
Load saved muway and set to muways soft threshold.

 * Fix for ticket:257
 * Updated nway code to save the soft threshold when saving.
 * Updated nway code to load the soft threshold when saving.
 * Updated MussaWindow.load code to use soft threshold loaded from muway file.
 * Upadted MussaWindow.load code to load properly when the window
   is empty to start with.
   * Added a reset() function to the ThresholdWidget to avoid emits
     * This actually didn't fix the problem (see ticket:262)
   * Broke the SIGNAL/SLOT loop causing multiple nways to be run, by
     breaking the connection from MussaWindow to ThresholdWidget while
     the ThresholdWidget.reset() function is called.

17 years agoimprove mupa comment character parsing
Diane Trout [Thu, 19 Apr 2007 23:12:35 +0000 (23:12 +0000)]
improve mupa comment character parsing
ticket:261
It also makes sure that load_mupa throws an exception when it loads
a file it doesn't understand.

I wonder if the GUI knows to catch this?

17 years agomake mupa file loading eol-style insensitive
Diane Trout [Thu, 19 Apr 2007 23:02:29 +0000 (23:02 +0000)]
make mupa file loading eol-style insensitive
ticket:260
I refactored the load_mupa_file function into one that takes a file,
opens it, and then passes it to a different function that takes a stream.
AKA split a function in two, so I could more easily unit test the
mupa loading code.

Once it was unit testable, I moved multiplatform_getline out of sequence,
into its own new cpp file and changed the mupa loading code to use it instead.

17 years agoLoad N sequences in Mussa::load
Brandon King [Wed, 18 Apr 2007 00:01:36 +0000 (00:01 +0000)]
Load N sequences in Mussa::load

Fix for ticket:240.

Mussa would not load the sequences because the .muway file would
declare that 0 sequences existed. Since the Mussa:load code needed to
know the number of sequences to load the sequences, it failed.

The new version of the load sequence code, reads the sequences in
until there are no longer any sequences to read. At that point, the
number of sequences is the_seqs.size() and therefore is no longer
dependant on the muway file.

17 years agoescape clears a sequence browser selection
Diane Trout [Mon, 16 Apr 2007 23:56:11 +0000 (23:56 +0000)]
escape clears a sequence browser selection
ticket:212

17 years agodraw a grey background to a track
Diane Trout [Sat, 14 Apr 2007 00:43:47 +0000 (00:43 +0000)]
draw a grey background to a track

17 years agostore default colors
Diane Trout [Sat, 14 Apr 2007 00:06:10 +0000 (00:06 +0000)]
store default colors
to cut down on the problem of repeating myself, provide a place to store
a default gene and track color.

17 years agoset annotation draw function by type
Diane Trout [Fri, 13 Apr 2007 23:38:43 +0000 (23:38 +0000)]
set annotation draw function by type
Additionally, I renamed a couple of functions to reflect that we're looking for valid sequence
instead of Ns, and my draw functions now use the color set in the drawable.
(Which also means that I have to set the color for the drawable class).

17 years agoMark real sequence instead of Ns
Diane Trout [Fri, 13 Apr 2007 18:44:48 +0000 (18:44 +0000)]
Mark real sequence instead of Ns
Since Mussa forces all annotations to be at least 1 pixel, marking where the real
sequence is located is visually clearer.

17 years agomake the N whiteout a bit bigger
Diane Trout [Wed, 11 Apr 2007 23:59:47 +0000 (23:59 +0000)]
make the N whiteout a bit bigger

17 years agoshow where the Ns are
Diane Trout [Wed, 11 Apr 2007 23:47:45 +0000 (23:47 +0000)]
show where the Ns are
ticket:243

This also tests the new draw function pointer in the drawable class,
as the N marking code uses that functionality to highlight where
the undefined regions are.

There were some problems in making sure that a subseq had the
right parent as I needed the current parent for the proper
draw coordinates.

17 years agoremove unncessary class qualifier
Diane Trout [Mon, 9 Apr 2007 21:28:31 +0000 (21:28 +0000)]
remove unncessary class qualifier
some versions of gcc dont like class qualifiers on function
declarations inside the class.

17 years agoadd function for marking 'N' regions
Diane Trout [Mon, 9 Apr 2007 21:01:46 +0000 (21:01 +0000)]
add function for marking 'N' regions
with the right draw function add_annotations_for_undefined_sequence
should be able to highlight the regions with Ns in them.

17 years agoadd draw function pointer to drawable
Diane Trout [Mon, 9 Apr 2007 20:00:55 +0000 (20:00 +0000)]
add draw function pointer to drawable

17 years agoremove annot class in favor of SeqSpan
Diane Trout [Fri, 6 Apr 2007 00:23:50 +0000 (00:23 +0000)]
remove annot class in favor of SeqSpan
It's not quite as clean as I might like as my metadata Annotations class
is annoying to access in C++.

also to support our our "legacy" mussa annotation file format I added
a couple of annotation creating helper functions.

Since I didn't want to also change the motif class at the same time,
I just move the members of annot into motif. At some point I'll finish
getting ride of motif.

17 years agoAdd getdefault to Annotations
Diane Trout [Fri, 6 Apr 2007 00:09:25 +0000 (00:09 +0000)]
Add getdefault to Annotations
and dont use std::string& for parameters as a string reference
doesn't work with char * literals.

17 years agofix uninitialized pointer
Diane Trout [Wed, 4 Apr 2007 01:08:29 +0000 (01:08 +0000)]
fix uninitialized pointer
ticket:256
I forgot to initialize the motif_list pointer in one of the Sequence
constructors. Unfortunately it was the one that was used by the mussa
load_sequence code, which hadn't been tested.

this patch adds a test, and fixes the reported problem.

17 years agofix problems with motif changes not showing up in sequencebrowser
Diane Trout [Tue, 3 Apr 2007 23:39:44 +0000 (23:39 +0000)]
fix problems with motif changes not showing up in sequencebrowser
This patch adds a couple of new unit test cases to make sure that
when the motif sequence list is changed it is actually reflected
in the sequence browser.

The problem was that when I originally coded it, a GlSequence held
a shared_ptr<Sequence> so even though SequenceBrowser had new copies
of GlSequence, the underlying Sequence was still shared.

The change to GlSequence being a subclass of Sequence with a copy
of the motif_list meant that changes to the motif_list in one
copy weren't reflected in the copy held by the SequenceBrowser.

I fixed it by changing sequence to hold a shared_ptr<list<motif> >.
the downside is that that the motif_list is now always shared
between copies of a Sequence, which is likely to cause problems
when opening a second mussa window.

However since I plan on tossing the current annotation and motif handling
code at some point in the near future, this patch should be "good
enough".

17 years agodelete default layout in MotifEditor
Diane Trout [Tue, 3 Apr 2007 23:38:24 +0000 (23:38 +0000)]
delete default layout in MotifEditor
Qt was generating warning messages about couldn't set layout
on the MotifEditor while one was already set. It turns out you
need to delete the default layout before calling setLayout().

17 years agotest motif editor pointers
Diane Trout [Mon, 2 Apr 2007 22:29:50 +0000 (22:29 +0000)]
test motif editor pointers
just make sure we have the right shared pointers in our editor

17 years agotest motif editor
Diane Trout [Sat, 31 Mar 2007 01:44:41 +0000 (01:44 +0000)]
test motif editor
I was thinking this is where the source of my motifs disappearing
might have been, but aparently the motif editor does still work
correctly.

17 years agotest MotifModel and MotifElement
Diane Trout [Sat, 31 Mar 2007 01:00:41 +0000 (01:00 +0000)]
test MotifModel and MotifElement
still haven't found the bug where motifs aren't being rendered
on the GlSeqBrowser correctly.

17 years agoseperate qt unittests into subdirectories
Diane Trout [Fri, 30 Mar 2007 21:02:13 +0000 (21:02 +0000)]
seperate qt unittests into subdirectories
I wanted to move the various qt unit tests into subdirectories to
make it a bit cleaner to add more tests.

17 years agoincorporate drawable and annotations
Diane Trout [Fri, 30 Mar 2007 18:36:28 +0000 (18:36 +0000)]
incorporate drawable and annotations
this removes most of the contents of GlSequence in favor of drawable,
and adds shared_ptrs to both drawable and annotations into SeqSpan.

One problem is getting the code to do coping instead of sharing a
reference at the right time.

What I've got right now is I added some constructors that take ThingRefs
(aka boost::shared_ptr<thing>) and those will create copies, while
the more standard reference or pointer initializers just copy the
shared_ptr.

This was a bit problematic in the case of GlSeqBrowser, which really
needs to make sure that its glsequences have their own drawable component.

17 years agocreate class to hold drawing information
Diane Trout [Fri, 30 Mar 2007 18:35:17 +0000 (18:35 +0000)]
create class to hold drawing information
this will be added to SeqSpan to add information needed to draw
stuff on the screen--only if a particular SeqSpan is being rendered.

17 years agocreate a metadata holding class
Diane Trout [Fri, 30 Mar 2007 18:34:34 +0000 (18:34 +0000)]
create a metadata holding class

17 years agoHandle subseq when the parent is on the minus strand
Diane Trout [Tue, 27 Mar 2007 21:46:54 +0000 (21:46 +0000)]
Handle subseq when the parent is on the minus strand

17 years agomove strand into seqspan
Diane Trout [Sat, 24 Mar 2007 01:00:49 +0000 (01:00 +0000)]
move strand into seqspan
this patch moves strand storage from Sequence into SeqSpan,
also when accessing sequence data from a SeqSpan that is currently
on the minus side it correctly returns reverse complemented data.

Unfortunately getting iterators that point to data thats a
transformation of currently existing data is a giant pain and
was making SeqSpan way to complicated.

So I took the easy way out. SeqSpan will now cache a reverse complement
of the region its pointing to and return iterators based on that.

Also Alphabet can reverse complement a string,

Drat, just realized that if one changes the region of SeqSpan,
the rc_seq will need to be invalidated.

17 years agoMissed part of "Store Sequence sequence location in a shared_ptr class"
Diane Trout [Wed, 21 Mar 2007 07:29:39 +0000 (07:29 +0000)]
Missed part of "Store Sequence sequence location in a shared_ptr class"

Bad things happen if you let eclipse refactor your _darcs pristine
repository. Modifications that you made don't get recorded.

This patch should make buildbot happy.

17 years agoMove alphabet type into SeqString
Diane Trout [Wed, 21 Mar 2007 03:55:12 +0000 (03:55 +0000)]
Move alphabet type into SeqString
This is another large patch.
This moves alphabet_ref from Sequence to SeqString.

I still need to deal with a better way of handling reverse complementing
especially given my attempts to keep everything in reference counted
structures.

Also this patch and the previous:
Store Sequence sequence location in a shared_ptr class
have broken the display of motifs in mussa.

(I used to be using shared_ptr<Sequences> for everything,
but now since there's a couple of seperate objects updating
the motifs in one doesn't really help so much for the other.

so warning, these two patches and the next few that I make
are going to be unstable.
**END OF DESCRIPTION***

Place the long patch description above the ***END OF DESCRIPTION*** marker.
The first line of this file will be the patch name.

This patch contains the following changes:

M ./alg/CMakeLists.txt +1
M ./alg/alphabet.cpp +35
M ./alg/alphabet.hpp -1 +14
M ./alg/motif_parser.cpp -3 +4
A ./alg/seq.cpp
M ./alg/seq.hpp -3 +17
M ./alg/seq_span.cpp -6 +3
M ./alg/seq_span.hpp -1 +4
M ./alg/sequence.cpp -82 +26
M ./alg/sequence.hpp -15 +10
M ./alg/test/CMakeLists.txt +1
M ./alg/test/test_alphabet.cpp +5
A ./alg/test/test_seq.cpp
M ./alg/test/test_seq_span.cpp +9
M ./alg/test/test_sequence.cpp -43 +43
M ./qui/motif_editor/MotifElement.cpp -2 +2

17 years agoStore Sequence sequence location in a shared_ptr class
Diane Trout [Tue, 20 Mar 2007 23:05:43 +0000 (23:05 +0000)]
Store Sequence sequence location in a shared_ptr class
This is a large (176 changes) patch, that moved most of the
information needed to store a sequence location into a class called
SeqSpan, which is designed to be solely managed as a shared_ptr.

This is one step in converting sequence annotations into being tree
of subsequences.

The hope is that the Sequence class doesn't store very much and
is mostly responsible for managing various collections of shared_ptrs
(which are a bit annoying to work with as local variables).

This also updated GlSequence to be a subclass of Sequence
(instead of holding a reference a shared_ptr<Sequence>)

Those changes required updating many random little function
calls.

17 years agomake sure paths continue to start with a /
Diane Trout [Thu, 8 Mar 2007 19:37:42 +0000 (19:37 +0000)]
make sure paths continue to start with a /
for some reason os.path.split was loosing the leading / for some
of my paths, this tests to see if it was there originally and
if it was, makes sure that its still present.

17 years agoadd a useful comment
Diane Trout [Thu, 8 Mar 2007 02:24:29 +0000 (02:24 +0000)]
add a useful comment

17 years agoSub-analysis failure to draw on init fix (ticket:254)
Brandon King [Sat, 3 Mar 2007 01:37:58 +0000 (01:37 +0000)]
Sub-analysis failure to draw on init fix (ticket:254)
 * This patch triggers a redraw after the window has been created by setting the dynamic threshold to the minimum.

17 years agoSave to image crash fix (ticket:251)
Brandon King [Sat, 3 Mar 2007 01:04:35 +0000 (01:04 +0000)]
Save to image crash fix (ticket:251)

17 years agomupa for test case
Diane Trout [Mon, 26 Feb 2007 22:48:50 +0000 (22:48 +0000)]
mupa for test case
this is used to verify that the mussa tosses a useful exception
when someone sets a bad filename for an annotation.

17 years agocmake was trying to link -loptimized
Diane Trout [Fri, 23 Feb 2007 19:28:10 +0000 (19:28 +0000)]
cmake was trying to link -loptimized
ticket:250
aparetnly QT_QTCORE_LIBRARY wasn't defined, so cmake was trying to link
-loptimized. However QT_QTCORE_LIBRARY_RELASE was defined, which
makes CMake happier

17 years agoMussagl version increased to 1.1.0
Brandon King [Fri, 23 Feb 2007 00:00:51 +0000 (00:00 +0000)]
Mussagl version increased to 1.1.0

17 years agoWhatsThis update 2
Brandon King [Wed, 21 Feb 2007 23:38:03 +0000 (23:38 +0000)]
WhatsThis update 2
 * Removing '*' since the bug seems to be Linux specific
 * Just having a space at the end fixes the linux whatsthis.

17 years agoWhatsThis update
Brandon King [Wed, 21 Feb 2007 23:20:47 +0000 (23:20 +0000)]
WhatsThis update

Added WhatsThis comments for:
  * Sequence info bar
  * New analysis dialog box

17 years agoAdded Qt version to Mussagl about box.
Brandon King [Wed, 21 Feb 2007 21:00:32 +0000 (21:00 +0000)]
Added Qt version to Mussagl about box.

17 years agokeep motifs after closing window
Diane Trout [Wed, 21 Feb 2007 01:46:24 +0000 (01:46 +0000)]
keep motifs after closing window
ticket:195
My previous implementation kept destroying and recreating the motif
editing dialog box. This version only deletes the motif editor when
MussaWindow.clear() is called.

17 years agomore error messages for loading an annotation.
Diane Trout [Tue, 20 Feb 2007 23:26:37 +0000 (23:26 +0000)]
more error messages for loading an annotation.
ticket:239
Return specific error messages if a path doesn't exist or is a directory
instead of a more generic there was a problem loading.

17 years agoignore paircomp
Diane Trout [Thu, 15 Feb 2007 19:30:55 +0000 (19:30 +0000)]
ignore paircomp
currently don't pay attention to the subversion checkout of paircomp
I have

17 years agoAdded newline char at end of file to remove gcc warning
Brandon King [Wed, 14 Feb 2007 01:50:23 +0000 (01:50 +0000)]
Added newline char at end of file to remove gcc warning

17 years agoAdded newline char at end of file to remove gcc warning
Brandon King [Wed, 14 Feb 2007 01:39:23 +0000 (01:39 +0000)]
Added newline char at end of file to remove gcc warning

17 years agoAdded new line at end of file to remove gcc warning
Brandon King [Wed, 14 Feb 2007 01:34:32 +0000 (01:34 +0000)]
Added new line at end of file to remove gcc warning

17 years agoAdded newline char to end of line (remove compile warning)
Brandon King [Wed, 14 Feb 2007 01:07:47 +0000 (01:07 +0000)]
Added newline char to end of line (remove compile warning)

17 years agoIsFileValidator doesn't use signal/slots
Diane Trout [Tue, 13 Feb 2007 23:40:02 +0000 (23:40 +0000)]
IsFileValidator doesn't use signal/slots

17 years agodetect 64bit processors and add -fPIC
Diane Trout [Sat, 3 Feb 2007 01:55:46 +0000 (01:55 +0000)]
detect 64bit processors and add -fPIC
this is an intermediate solution as I probably can use ADD_DEFINES()
to add the command line options for the compiler instead of fiddingly
with CMAKE variables

Props to Brandon for finding the solution in an openwengo patch.
http://dev.openwengo.org/trac/openwengo/trac.cgi/changeset/9139
Long Live CMake!

17 years agoadd some newlines at the end of some of our files
Diane Trout [Fri, 5 Jan 2007 01:49:12 +0000 (01:49 +0000)]
add some newlines at the end of some of our files
gcc 4.2 complains about this.

17 years agoconditionally build the paircomp tests
Diane Trout [Thu, 4 Jan 2007 22:34:37 +0000 (22:34 +0000)]
conditionally build the paircomp tests

17 years agopaircomp used the string find_first_not_of
Diane Trout [Thu, 4 Jan 2007 22:28:08 +0000 (22:28 +0000)]
paircomp used the string find_first_not_of
so i needed to add it to my sequence class. (I'm trying to keep
my sequence class to look like an immutable string).

17 years agosplit unittests into seperate executables
Diane Trout [Thu, 4 Jan 2007 21:40:35 +0000 (21:40 +0000)]
split unittests into seperate executables
ticket:208
I decided it was easer to debug my unittests when they were
in smaller pieces.

17 years agobuild paircomp if available
Diane Trout [Thu, 21 Dec 2006 00:02:57 +0000 (00:02 +0000)]
build paircomp if available

17 years agolen(mussa.paths()) should equal the number of found paths
Diane Trout [Thu, 14 Dec 2006 21:17:25 +0000 (21:17 +0000)]
len(mussa.paths()) should equal the number of found paths
ticket:244
for some reason I was returning the number of sequences instead,
that is available as sequence_count.

Renamed size_t in NwayPaths to NwayPaths::size_type

Also I exported the various types of path size counts to the python layer

17 years agobe resistent to not creating the browser
Diane Trout [Wed, 13 Dec 2006 00:42:03 +0000 (00:42 +0000)]
be resistent to not creating the browser
just on the off chance that MussaWindow.browser isn't created
test the pointer before trying to call it.
(AKA some left over debugging code)

17 years agomake mussawindow initialize icons
Diane Trout [Wed, 13 Dec 2006 00:40:25 +0000 (00:40 +0000)]
make mussawindow initialize icons
this is also part of the useless try to stop qobject::moveToThread
warnings, but I decided it was a good idea for when qui/mussagl.cpp:main
isn't called because we were launched from a python extension.

17 years agotry to reduce number of moveToThread warnings
Diane Trout [Wed, 13 Dec 2006 00:14:00 +0000 (00:14 +0000)]
try to reduce number of moveToThread warnings
I went off on a fools errand of trying to get rid of the QObject::moveToThread
warnings that Qt was spitting out when trying to prepare an icon.

Qt does prefer widgets to be dynamically constructed and to have their
parent widget set, which is what I tried to do to cut down on the
useless chatter.

(Note the chatter only happens on OS X when the frameworks have been installed
into the application bundle).

17 years agofix infinite loop for absolute pathnames
Diane Trout [Tue, 12 Dec 2006 02:27:22 +0000 (02:27 +0000)]
fix infinite loop for absolute pathnames
and add a --prelink-only update
and update to qt 4.2.2

17 years agoprovide get_py and get_py_ptr
Diane Trout [Thu, 7 Dec 2006 23:49:39 +0000 (23:49 +0000)]
provide get_py and get_py_ptr
I didn't like (*get_py)['name' as a way of getting a python namespace
object. So I changed get_py back to returning a reference by introducing
a new function get_py_ptr which creates the python singleton and returns
a pointer to it.

17 years agocut down on unnecessary linking to the python library
Diane Trout [Thu, 7 Dec 2006 00:31:08 +0000 (00:31 +0000)]
cut down on unnecessary linking to the python library

17 years agoAllocating objects in the constructor causes problems
Diane Trout [Thu, 7 Dec 2006 00:23:14 +0000 (00:23 +0000)]
Allocating objects in the constructor causes problems
What do you know, being lazy and initializing Qt GUI objects in the
constructor cause problems. (AKA a segfault when running as a test case).

This patch allocates the various GUI objects in an actual function
(which is so the different contstructors can use the same initialization
code.

It looks like another coding standard to remember.

17 years agomake compiled in python extension initialization more flexable
Diane Trout [Tue, 5 Dec 2006 23:54:57 +0000 (23:54 +0000)]
make compiled in python extension initialization more flexable
Because of weird library ordering issues, my test case that tested
running python code was looking for compiled in python modules that
weren't available yet it wouldn't link properly.

I solved this by making it possible to provide a list of what
compiled-in python extensions should be initialized when you launch
the interpreter, so the mussagl program, which does have all the right
components linked in is what is specifying what modules should be
provided to the python interpreter.

Now I just need to fix the build system so you can compile mussa without
all this python crud if needed.

And maybe decide how to launch the gui from a stanard python interpreter.

17 years agodirectly build the python extension modules
Diane Trout [Tue, 5 Dec 2006 02:22:00 +0000 (02:22 +0000)]
directly build the python extension modules
I learned about SET_TARGET_PROPERTIES( ... PREFIX )
to change the starting prefix for a library, which means
that I don't need to copy the libX.so to X.so to make something
a python importable module.

17 years agoprovide python interpreter for mussa qui via a seperate thread
Diane Trout [Tue, 5 Dec 2006 00:17:22 +0000 (00:17 +0000)]
provide python interpreter for mussa qui via a seperate thread
helps ticket:201
Since both the python read-eval-print loop and Qt have their own
event loops one can't easily have a single threaded application
provide GUI code while still having an interpreter sitting around.
Additionally due to the limitations of OS X and Windows, the main
thread needs to be the GUI thread, so I needed to start the python
interpreter in a seperate thread.

I implemented several helper classes in qui/threading to help manage
creating threads. Currently it just provides a singleton interpreter
thread. The interpreter when started in its subthread will try to
initialize ipython, and if that fails will try InteractiveConsole
(I suppose I should've caught that failing, and then finally fell back
to the fgets read-eval-looop).

The way access to the GUI layer is handled is via a signal/slot thread
specific proxy class which holds a mussa analysis object and notifies
the copy in the main thread via a signal to create a new window using
the provided mussa object.

Access to some parts of the mussa object are thread safe, because I was
so enthusiastic about marking functions as const. All the other parts
are, shall we say, "up for grabs".

The other issue is I really need to improve the CMake scripts to be
a bit more robust about deteriming if python should be linked in.
(And one of my tests breaks because of this patch).

But since it works on OS X I want to know what it'll do on linux.
I'm pretty sure since a windows GUI app doesn't have a console that
it won't work on windows. (To say nothing of the command line
argument parser crashing under windows).

17 years agoallow adding and viewing sequences to an analysis from python
Diane Trout [Thu, 30 Nov 2006 02:23:08 +0000 (02:23 +0000)]
allow adding and viewing sequences to an analysis from python
this required a way to deal with the collection of sequences
returned by Mussa::sequences()

the python wiki had some suggestions (though their code didn't compile)
http://wiki.python.org/moin/boost.python/StlContainers

17 years agoadd python interface to seqcomp
Diane Trout [Wed, 29 Nov 2006 02:14:45 +0000 (02:14 +0000)]
add python interface to seqcomp
which is actually provided by the class FLP

17 years agoFinish off setting sequence offset user interface
Diane Trout [Wed, 22 Nov 2006 20:24:21 +0000 (20:24 +0000)]
Finish off setting sequence offset user interface
ticket:111
I thought it would be better for the edit sequence properties action to live
under the main edit menu, instead of the popup menu.

Also I decided to use apply/close instead of ok/cancel as it seemed better
to make fiddling with the offset interactive.

And yes I probably should implement some graphical way of aligning the
sequences instead of just typing in offsets.

17 years agoquick option to show sequence properties window
Diane Trout [Tue, 21 Nov 2006 20:26:46 +0000 (20:26 +0000)]
quick option to show sequence properties window