mussa.git
17 years agoMussa Manual: updated motif dialog section.
Brandon King [Tue, 17 Oct 2006 18:59:56 +0000 (18:59 +0000)]
Mussa Manual: updated motif dialog section.
 * Updated text/screenshots in the motif dialog section. (ticket #191)

17 years agoalways add a blank motif
Diane Trout [Tue, 17 Oct 2006 18:47:49 +0000 (18:47 +0000)]
always add a blank motif
ticket:186
given the way the motif editor automatically adds motifs its important
to make sure there's a blank one for users to start editing with.

17 years agoMussa Manual: Saving section
Brandon King [Tue, 17 Oct 2006 18:14:59 +0000 (18:14 +0000)]
Mussa Manual: Saving section
 * Added a new saving section
 * Added section template for save on close (ticket #189)
 * Documented saving analysis (ticket #176)
 * Documented saving analysis as (ticket #176)
 * Documented saving motif lists (ticket #175)

17 years agoMussa Manual: create/load analysis section updated
Brandon King [Tue, 17 Oct 2006 17:29:52 +0000 (17:29 +0000)]
Mussa Manual: create/load analysis section updated
 * Updated text/screenshots in the "Create new analysis" section (ticket #169)
 * Updated text/screenshots in "Load a mussa parameter file" section. (ticket #181)
 * Updated text/screenshots in "Load an analysis" section. (ticket #185)

17 years agomore python interface to Sequence
Diane Trout [Tue, 17 Oct 2006 06:50:49 +0000 (06:50 +0000)]
more python interface to Sequence

17 years agoforce loaded sequence to uppercase
Diane Trout [Tue, 17 Oct 2006 06:46:02 +0000 (06:46 +0000)]
force loaded sequence to uppercase
ticket:183

17 years agovalidate app bundle before shipping
Diane Trout [Tue, 17 Oct 2006 01:36:10 +0000 (01:36 +0000)]
validate app bundle before shipping
ticket:180
This path adds some support for parsing otool results so I can test
to make sure that object files are only linked against /usr/lib,
/System/Library or @executable_path entries.

I changed it to use subprocess (which required installation on OS X
because of python2.3) and it'll also handle the uploading of packages
now.

17 years agodon't link against X11 on OS X
Diane Trout [Tue, 17 Oct 2006 01:33:06 +0000 (01:33 +0000)]
don't link against X11 on OS X
the python shared library ended up picking up a link to the OS X
X11R6 libraries because it was linking against the GUI code,
if we let it link mussa will require X11 to be present on the users
system which is not always true for an OS X user.

17 years agoMussa manual: Overview section update
Brandon King [Mon, 16 Oct 2006 18:51:19 +0000 (18:51 +0000)]
Mussa manual: Overview section update
 * Updated all images in overview section to latest version of Mussa. (Tickets: #166, #172, #173)
 * Updated text in section to match latest version of Mussa. (Tickets: #166, #172, #173)
 * Removed 'Motif Toggle' button documentation. (ticket:171)

17 years agoMussa Manual: Link to example data in UCSC genome browser section.
Brandon King [Mon, 16 Oct 2006 17:07:19 +0000 (17:07 +0000)]
Mussa Manual: Link to example data in UCSC genome browser section.
 * Added a link to the SMN1 example data made available on our wiki.

17 years agoMussa Manual: Save to image
Brandon King [Sat, 14 Oct 2006 01:06:17 +0000 (01:06 +0000)]
Mussa Manual: Save to image
 * Added documentation for the save to image feature.

17 years agodon't seqcomp sequences that are too small
Diane Trout [Sat, 14 Oct 2006 01:05:05 +0000 (01:05 +0000)]
don't seqcomp sequences that are too small
ticket:151
seqcomp gets really grumpy when it trys to analyze a sequence that
is shorter than the window sequence. So instead of letting it try
to malloc all of your memory, throw a more useful exception.

Also I updated the SubanalysisWindow to catch the exception and
report it to the user.

17 years agoFix for ticket:160
Brandon King [Sat, 14 Oct 2006 00:28:01 +0000 (00:28 +0000)]
Fix for ticket:160
  * gcc 4.0.3 didn't like assing 0 to a MussaRef, removed default value based on Diane's suggestion. That did the trick.

17 years agoMussa Manual: motif list file masks
Brandon King [Sat, 14 Oct 2006 00:24:25 +0000 (00:24 +0000)]
Mussa Manual: motif list file masks
  * Documented file masks for motif lists.
  * Closes ticket:153

17 years agoadd operator< to ConservedPath
Diane Trout [Sat, 14 Oct 2006 00:05:43 +0000 (00:05 +0000)]
add operator< to ConservedPath
So I could sort a list of ConservedPaths it was hopefully going to
let me make simple_refine a little bit better by grouping paths
that were next to each other closer than those that were almost
next to each other execpt one match far away. Unfortunately
I didn't think it all the way through and the lists are already
sorted by that criteria. e.g.

1,1,1 < 1,1,70 < 2,2,2

when what simple refine needis is something more like

1,1,1 < 2,2,2 < 1,1,70

17 years agoBuild number python script
Brandon King [Fri, 13 Oct 2006 22:52:24 +0000 (22:52 +0000)]
Build number python script
 * Reports the build number of a given darcs repository of mussa.
 * In support for ticket:124.

17 years agoSave to image fix (ticket:96)
Brandon King [Fri, 13 Oct 2006 22:07:18 +0000 (22:07 +0000)]
Save to image fix (ticket:96)

  * ImageSaveDialog now uses a SequenceBrowser copy contructor to draw the image.

  * glseqbrowser copy constructor was missing path_segments.

  * SequenceBrowser now has a copy constructor.

  * ImageSaveDialog needed to updated to use the bp per pixel zoom magnification;
meaning that when the user wants an image twice the x value of the glcanvas,
then the bps per pixel needed to halved.

  * bp_per_pixel2 = ( x_1 / x_2) * bp_per_pixel_1

17 years agosave motifs with the analysis
Diane Trout [Fri, 13 Oct 2006 05:48:13 +0000 (05:48 +0000)]
save motifs with the analysis
ticket:133
This is the last part to implement ticket:133 this hooks up the
Mussa::save and Mussa::load code to automatically try saving the motif lists
into the analysis subdirectory.

17 years agopass default_dir around
Diane Trout [Fri, 13 Oct 2006 01:31:41 +0000 (01:31 +0000)]
pass default_dir around
convert default_dir to be a shared_ptr and then pass it around
all of our windows that need to save things. Pretty much now
whenever someone saves something we'll remember that last directory
and use it as our default dir.

I hope this works on windows, if it breaks, there
might be a few fs::natives that are needed.

17 years agochange default_dir to a QDir
Diane Trout [Fri, 13 Oct 2006 00:52:08 +0000 (00:52 +0000)]
change default_dir to a QDir
from a boost::filesystem::path, this should make it
easier to pass around.

17 years agocleanup image save dialog aesthetics
Diane Trout [Thu, 12 Oct 2006 23:52:19 +0000 (23:52 +0000)]
cleanup image save dialog aesthetics
ticket:96
one of the problems is that when people try saving an image they
couldn't find where the image was saved too. This is probably because
they didn't set a file name and no errors were thrown.

this patch ties the "save as" prompt to the save button, so once someone
gets the pixel size right they have to chose a filename.

I also fixed the problem where it wasn't loading the "lock aspect ratio"
icon out of the resource file, and made a few other aesthetics updates.

17 years agotabs are of the devil
Diane Trout [Thu, 12 Oct 2006 22:58:08 +0000 (22:58 +0000)]
tabs are of the devil

17 years agoCMakeLists.txt: Added extra QT_LIBS depend to fix Qt Assistant linking.
Brandon King [Thu, 12 Oct 2006 22:47:45 +0000 (22:47 +0000)]
CMakeLists.txt: Added extra QT_LIBS depend to fix Qt Assistant linking.

17 years agoFix initialization of QtAssistant
Diane Trout [Thu, 12 Oct 2006 21:57:20 +0000 (21:57 +0000)]
Fix initialization of QtAssistant
ticket:120
I reenabled calling QtAssistant for help on windows to get around the lack
of a python standard library. However, I forgot to update the define
for initializing the QtAssistant. Needless to say an unininitialized
QtAssistantClient pointer wasn't terribly useful.

17 years agobetter glyph offset computation
Diane Trout [Thu, 12 Oct 2006 21:51:19 +0000 (21:51 +0000)]
better glyph offset computation
my first attempt at computing an offset to better center the
AGCTN ended up putting the links under the wrong basepair.

Not only does this patch put the segment under the right basepair
it also makes the glyphs a little bit wider.

17 years agoWindows installer script: updated to work in makelib directory
Brandon King [Thu, 12 Oct 2006 18:56:25 +0000 (18:56 +0000)]
Windows installer script: updated to work in makelib directory

17 years agodoes createLocalAlignment work for a 3 way?
Diane Trout [Thu, 12 Oct 2006 09:51:45 +0000 (09:51 +0000)]
does createLocalAlignment work for a 3 way?
try to test ticket:137
I was hoping that creating a unit test would flush out the case where
a segement isn't part of a path. But unfortunately that doesn't seem
to happen.

However my draw code is drawing my paths in the wrong place.

17 years agoadd implementation for save motif menu item
Diane Trout [Thu, 12 Oct 2006 01:00:59 +0000 (01:00 +0000)]
add implementation for save motif menu item
ticket:133
this adds part of the save motif code. I still need to save motifs
that are attached to an analysis.

17 years agoMake help a bit more reliable
Diane Trout [Thu, 12 Oct 2006 00:14:00 +0000 (00:14 +0000)]
Make help a bit more reliable
ticket:120 ticket:49 ticket:98
Brandon figured out how to install QtAssistant on windows I haven't worked it
out for OS X or linux yet (as its noticeably harder).

I'd switched to using pythons webbrowser.open to go to our documentation
pages, except that only works if the python standard library is installed.
However windows lacks such a thing, and so the webbrowser.open code
wouldn't work.

This patch enables the QtAssistant for windows, and uses webbrowser.open
on OS X and Linux.

Also it'll actually open a warning messagebox if something goes wrong
trying to open the help, and display a not very useful error message.

17 years agolookup python code with c++
Diane Trout [Wed, 11 Oct 2006 23:43:33 +0000 (23:43 +0000)]
lookup python code with c++
use boost::algorithm::split to split our python namespace
reference.

17 years agoValidate motif input
Diane Trout [Wed, 11 Oct 2006 22:52:45 +0000 (22:52 +0000)]
Validate motif input
ticket:149
To reduce the chances that someone will manage to make an unloadable
motif file, prevent the user from entering bad data.
e.g. " in motif names, or non-iupac symbols in the sequence in
MotifEditorDelegate::createEditor

17 years agoadd Mussa::save_motif()
Diane Trout [Wed, 11 Oct 2006 21:37:48 +0000 (21:37 +0000)]
add Mussa::save_motif()
necessary for ticket:133
This adds the low level motif saving code to Mussa. To make things
work a bit more reliably, the parse code can understand the alpha
channel now (so I can save hidden motifs), and can parse a
motif name that is quoted like "foo asdf". I added that as I expect
users will put spaces in their motif names.

Although things'll probably break if someone puts a " in a motif name.
see ticket:149

17 years agothrow errors when spirit parsing fails
Diane Trout [Wed, 11 Oct 2006 20:59:30 +0000 (20:59 +0000)]
throw errors when spirit parsing fails
ticket:126
this patch adds code to throw errors (and give some rough idea
where the error was) when the spirit parser fails. (Currently
either loading motifs, or loading sequence annotations).

Also I added a typedef to shorten std::set<Sequence> to motif_set

17 years agouse spinboxes for the setup analysis dialog
Diane Trout [Wed, 11 Oct 2006 00:52:28 +0000 (00:52 +0000)]
use spinboxes for the setup analysis dialog
ticket:148
the easiest way of making sure that threshold was less than window
size was to use spin boxes.

Also I updated the dialog box to use dynamically allocated Qt widgets.

17 years agoa title of path("/my/silly/path") doesn't work on windows
Diane Trout [Wed, 11 Oct 2006 00:39:43 +0000 (00:39 +0000)]
a title of path("/my/silly/path") doesn't work on windows
since it doesn't really matter what it is just make sure
its the same length.

17 years agouse lines if a quad would be smaller than a pixel
Diane Trout [Wed, 11 Oct 2006 00:06:25 +0000 (00:06 +0000)]
use lines if a quad would be smaller than a pixel
closes ticket:147
Mussa looks nicer when there's a minimum width to segments
connecting tracks.

17 years agoinitialize the motif_editor with analysis motifs
Diane Trout [Tue, 10 Oct 2006 23:22:35 +0000 (23:22 +0000)]
initialize the motif_editor with analysis motifs
ticket:139 the motif editor dialog wasn't actually looking at the
motifs stored in the analysis to initialize its model with. So
when one either closed the window or tried initializing from a file
the dialog wouldn't reflect what was actually on the screen.

17 years agoimplement alphabet for sequence
Diane Trout [Tue, 10 Oct 2006 22:27:54 +0000 (22:27 +0000)]
implement alphabet for sequence
in order to fix ticket:144 when motifs were changed to be
sequences I needed someway of specifying what alphabet a particular
sequence is using.

This patch changes things so a sequences default sequence alphabet
is a "AGCTUN" AKA reduced nucleic alphabet.

Motifs however use the full IUPAC nucleic alphabet.

(Or at least I hope they do I tested the sequence class, but GUI
testing is harder).

Another change is that instead of building a fixed reverse complement
table, there's a function which creates the table and understands
that at least for reduced_rna_alphabet (currently the only specifically RNA
alphabet) the reverse of A should be a.

Sequence is no longer case sensitive, all of the comparisons
are now done in an insensitive manner.

Finally I found a bug in the motif scanning code that was due to a typo
from long before I inherited the code. Aparently that code branch in
motif_scan had never been executed before.

17 years agolength 1 segments should be drawn as lines
Diane Trout [Thu, 5 Oct 2006 21:05:56 +0000 (21:05 +0000)]
length 1 segments should be drawn as lines
I also tried to center both the line and the character glyph a bit.
No I don't know why I needed to divide by 4.0 instead of 2.0. But
it looked better--so there.

17 years agodraw link lines with a width
Diane Trout [Thu, 5 Oct 2006 01:29:19 +0000 (01:29 +0000)]
draw link lines with a width
ticket:134
Segments connecting two sequence locations together now have a "length"
field which is drawn as a width across the screen.

The problem with this patch is that on the sequence view, where you want
a narrow line, it's drawing something the width of the base pair.

perhaps that's ok, or perhaps in that case I can have a length of 0,
or perhaps lenghts of 1 could also be drawn as a line, or perhaps
the edges of one of these rectangles should be shrunk a bit.

(that might also make things look a bit more centered.

17 years agoadd --motifs
Diane Trout [Wed, 4 Oct 2006 21:59:09 +0000 (21:59 +0000)]
add --motifs
ticket:143 this patch allows one to specify a motifs file to annotate
an analysis with.

17 years agotrigger motif update from loadMotifList
Diane Trout [Wed, 4 Oct 2006 01:13:28 +0000 (01:13 +0000)]
trigger motif update from loadMotifList

17 years agofixes for Mussa::load_motif
Diane Trout [Wed, 4 Oct 2006 01:02:21 +0000 (01:02 +0000)]
fixes for Mussa::load_motif
If you're using references to pass variables from the boost::spirit parser
via a functor class, it might be useful to actually make sure the
class constructors parameters are references too.

This does improve how a motif file is parsed.

17 years agocolors should default to being visible
Diane Trout [Wed, 4 Oct 2006 01:01:09 +0000 (01:01 +0000)]
colors should default to being visible
alpha of 1 is visible, 0 is invisible. having a default of invisible
is confusing.

17 years agoAdd window titles
Diane Trout [Tue, 3 Oct 2006 21:36:10 +0000 (21:36 +0000)]
Add window titles
this patch adds window titles to most of the windows that Mussa will
popup. I refactored the code that figured out a reasonble title name
from MussaWindow and put it into Mussa.

This did mean that the SubanalysisWindow now needed its own copy
of a MussaRef so it could ask the analysis for its name.

17 years agofix wrong parent for scrollable_browser
Diane Trout [Thu, 15 Jun 2006 06:24:06 +0000 (06:24 +0000)]
fix wrong parent for scrollable_browser

17 years agoAdd ReadOnly ThresholdWidget to MussaAlignedWindow
Diane Trout [Tue, 3 Oct 2006 20:52:02 +0000 (20:52 +0000)]
Add ReadOnly ThresholdWidget to MussaAlignedWindow
The simplest way of report the threshold was to reuse the current
threshold widget. However since it makes no sense to change the threshold
at on the aligned sequence level view, I added the ability to make
the widget read only.

17 years agoUse pointers in ThresholdWidget
Diane Trout [Tue, 3 Oct 2006 20:48:37 +0000 (20:48 +0000)]
Use pointers in ThresholdWidget
Change threshold widget to use dynamically allocated objects
instead of statically allocated objects. I think Qt prefers this, but
now I'm less sure.

17 years agoAllow MussaAlignedWindows to create subanalyses
Diane Trout [Tue, 3 Oct 2006 01:14:56 +0000 (01:14 +0000)]
Allow MussaAlignedWindows to create subanalyses
I passed a shared_ptr reference for the subanalysis window
from MussaWindow to MussaAlignedWindow so either window can be used
to customize the same subanalysis.

17 years agoDeath to stupid mussa pointers
Diane Trout [Tue, 3 Oct 2006 00:11:04 +0000 (00:11 +0000)]
Death to stupid mussa pointers
Long live smart pointers like boost::shared_ptr
Go through mussa and replace references to Mussa * or Mussa & with
a typedef MussaRef which is defined as boost::shared_ptr<Mussa>

17 years agoadd updateTitle
Diane Trout [Mon, 2 Oct 2006 23:12:05 +0000 (23:12 +0000)]
add updateTitle
localize the code for updating the MussaWindow title.

17 years agoMake MussaWindow UI objects pointers
Diane Trout [Mon, 2 Oct 2006 23:07:00 +0000 (23:07 +0000)]
Make MussaWindow UI objects pointers
It appears to me that Qt seems to like UI widgets that are attached to
it to be pointers as it'll sometimes handle freeing said pointer, which is
bad when its a statically allocated member of a class.

So this patch tries to make most of the UI objects associated with
MussaWindow pointers (I had to convert some elements of the
SequenceBrowserWidget as MussaWindow was storing references to them.)

17 years agobetter motif editor
Diane Trout [Fri, 29 Sep 2006 01:01:06 +0000 (01:01 +0000)]
better motif editor
ticket:122
This patch uses a QTableView for the motif editor which provides
both a better looking editor and supports adding an arbitrary number of
motifs.

17 years agoTool for inserting changelog into rst documents (i.e. manual)
Brandon King [Tue, 26 Sep 2006 19:50:33 +0000 (19:50 +0000)]
Tool for inserting changelog into rst documents (i.e. manual)

17 years agoMussagl Manual: Status Section
Brandon King [Mon, 25 Sep 2006 22:49:17 +0000 (22:49 +0000)]
Mussagl Manual: Status Section

17 years agoWin32 SaveAs Patch
Brandon King [Fri, 22 Sep 2006 23:41:13 +0000 (23:41 +0000)]
Win32 SaveAs Patch

17 years agoIf we don't need any python link libraries don't produce output
Diane Trout [Thu, 21 Sep 2006 18:44:09 +0000 (18:44 +0000)]
If we don't need any python link libraries don't produce output
this is to fix an issue brandon found

17 years agoMussagl Manual: Spelling and Grammar Fixes
Brandon King [Thu, 21 Sep 2006 00:57:33 +0000 (00:57 +0000)]
Mussagl Manual: Spelling and Grammar Fixes

 * Made some spelling and error fixes thanks... Thanks Erich!

17 years agocatch possible segfault with get_sequence()
Diane Trout [Tue, 19 Sep 2006 20:45:50 +0000 (20:45 +0000)]
catch possible segfault with get_sequence()

17 years agoneed a cassert
Diane Trout [Mon, 18 Sep 2006 22:49:38 +0000 (22:49 +0000)]
need a cassert

17 years agoRemember to include Platform to get PYTHON_LINK_LIBARIES
Diane Trout [Mon, 18 Sep 2006 22:48:19 +0000 (22:48 +0000)]
Remember to include Platform to get PYTHON_LINK_LIBARIES
ticket:125
I forgot to include Platform in the base CMakeLists.txt to get the
definition of PYTHON_LINK_LIBRARIES. With that everything builds correctly.

17 years agoask python what libraries we need to link with
Diane Trout [Mon, 18 Sep 2006 22:26:11 +0000 (22:26 +0000)]
ask python what libraries we need to link with
ticket:125 (hopefully fixes)
distutils has some nice variables that will tell us what system libraries
we need to link with.

This patch includes a small python wrapper that makes it easy for cmake
to extract that information.

17 years agoLoad saved analysis can open new windows
Diane Trout [Sat, 16 Sep 2006 00:12:53 +0000 (00:12 +0000)]
Load saved analysis can open new windows
ticket:105
this makes mussa behave a bit more like a traditional gui app, in that
saved analyses will replace empty windows, but will create new windows
if there's already something loaded.

Also new windows will copy the default_dir from the parent window.

17 years agoif you need to do a save as, you really don't need to save too
Diane Trout [Fri, 15 Sep 2006 22:50:27 +0000 (22:50 +0000)]
if you need to do a save as, you really don't need to save too
when you comment out an else if, perhaps you should leave in the else
part.

17 years agoremember the last directory we were did something in
Diane Trout [Fri, 15 Sep 2006 22:30:15 +0000 (22:30 +0000)]
remember the last directory we were did something in
and then default new operations to that directory.

AKA if we open a mupa file /this/path/to.mupa the next time we open a dialog
to do some IO it will default to /this/path

17 years agoremove reporting the current path from the about box
Diane Trout [Fri, 15 Sep 2006 22:29:43 +0000 (22:29 +0000)]
remove reporting the current path from the about box
that was mostly in there for debugging and isn't needed anymore

17 years agouse the loaded analysis path as the default save path
Diane Trout [Fri, 15 Sep 2006 22:27:20 +0000 (22:27 +0000)]
use the loaded analysis path as the default save path
if no save location is specified for an analysis and we happen to have
an analysis location that we were loaded from, default to saving to the
same location.

17 years agoalways save
Diane Trout [Fri, 15 Sep 2006 18:38:31 +0000 (18:38 +0000)]
always save
the mussa dirty flag isn't updated in enough situations, like if you
change a sequences meta data, the mussa dirty flag isn't updated.

Might make sense that once glsequence is a subclass of sequence to
put a dirty flag there.

17 years agokeep track of a subsequences parent
Diane Trout [Fri, 15 Sep 2006 18:08:09 +0000 (18:08 +0000)]
keep track of a subsequences parent
fixes ticket:129
I needed to know the parent offset inorder to get the start/stop sizes
to be relative to its parent in a "sequence" tree.

17 years agoreport our "start/stop" location on a subsequence
Diane Trout [Fri, 15 Sep 2006 00:48:10 +0000 (00:48 +0000)]
report our "start/stop" location on a subsequence
this should be useful for trying to use sequences as a replacement
for the annotation class.

of course ticket:129 is a problem. I need to figure out how to get
the start/stop coordinates to be relative to the immediate parent, not
relative to the base sequence. (Or perhaps i should be able to retrieve
both versions)

17 years agouse an enum instead of a bool for strandedness
Diane Trout [Fri, 15 Sep 2006 00:31:35 +0000 (00:31 +0000)]
use an enum instead of a bool for strandedness
I wanted to track more than +/- strand, I wanted to know if an annotation
was "unknown" or perhaps applied to both strands.

17 years agomake our Color class serializable
Diane Trout [Fri, 15 Sep 2006 00:11:40 +0000 (00:11 +0000)]
make our Color class serializable
this is part of an idea to move the color of a sequence into
the sequence class, instead of living in glsequence or the
AnnotationColor mapper.

17 years agodo a better job of erasing the browser sidebars
Diane Trout [Thu, 14 Sep 2006 21:07:59 +0000 (21:07 +0000)]
do a better job of erasing the browser sidebars
ticket:127
the previous sidebar clearing code didn't remove the spacers between
the various widgets. This will do that (though for some reason
QLayout::removeItem wouldn't properly destroy my widgets, I had to use
QLayout;:removeWidget on them, which is why there are two loops in
SequenceBrowserSidebar::clear.

I also defined some typedefs in SequenceBrowserSidebar to abstract out
the exact type being used to store the sidebar detail widgets
(SequenceDescription) in case I want to switch to a boost::shared_ptr in case I want to switch to a boost::shared_ptr in case I want to switch to a boost::shared_ptr in case I want to switch to a boost::shared_ptr

17 years agomake sure we show the start of our sequence name
Diane Trout [Thu, 14 Sep 2006 20:10:34 +0000 (20:10 +0000)]
make sure we show the start of our sequence name
fixes ticket:128

17 years agoImplement an optional name in the motif parser
Diane Trout [Thu, 14 Sep 2006 01:33:19 +0000 (01:33 +0000)]
Implement an optional name in the motif parser
ticket:116
Using the spirit parser the motif file now takes a sequence, optional name,
and the RGB float colors.

The down side to this is I don't currently know how to get spirit to report
parse errors.

17 years agoMussa Manual: Todo comments
Brandon King [Wed, 13 Sep 2006 22:14:25 +0000 (22:14 +0000)]
Mussa Manual: Todo comments

17 years agoMussaSetupDialog remembers previous load directory
Diane Trout [Wed, 13 Sep 2006 01:16:14 +0000 (01:16 +0000)]
MussaSetupDialog remembers previous load directory
Implements ticket:101
Basically the setup dialog kept using the current directory, this
patch stores a "default_directory" in the SequenceSetupFrame so the
various SequenceSetupWidgets have a place to grab a default directory.

It starts off set to the "current" path, but whill remember whatever
you pick after that. (Perhaps it should default to the home directory?)

17 years agodefault saveAnalysisAs to users home directory
Diane Trout [Wed, 13 Sep 2006 00:08:24 +0000 (00:08 +0000)]
default saveAnalysisAs to users home directory

17 years agowarn the user if we're going to replace an analysis
Diane Trout [Tue, 12 Sep 2006 23:54:19 +0000 (23:54 +0000)]
warn the user if we're going to replace an analysis
though users would prefer a new window when they pick load, that causes
problems because I don't have an easy way for the new window to be
responsible for the Mussa::analyze() call.

So currently the create new window mode will occasionally cause mussa to
hang. As a result I loading will replace the current window.

17 years agoimplement "typical" save and close conventions.
Diane Trout [Tue, 12 Sep 2006 23:37:27 +0000 (23:37 +0000)]
implement "typical" save and close conventions.
After running an analysis if it hasn't been saved, and you try to close
the window, mussa will ask if you want to save, not save, or cancel the close.
Saving also uses the recently implemented tracking the analysis_path to
determine if it should just offer to save or to use save as.

the only real issue is the dirty flag might get tripped for things
that aren't actually being saved yet.

17 years agotrack where our analysis is saved and if the analysis is empty
Diane Trout [Tue, 12 Sep 2006 23:00:07 +0000 (23:00 +0000)]
track where our analysis is saved and if the analysis is empty
This will be useful for getting typical office application like save/save as
conventions working.

17 years agoimplement analysis save as dialog
Diane Trout [Tue, 12 Sep 2006 01:40:55 +0000 (01:40 +0000)]
implement analysis save as dialog
this does seem to let you save an analysis. So I need to get the autosaving
to turn off.

and it defaults to the app "current" directory which isn't ideal.

17 years agoadd seq_forward
Diane Trout [Tue, 12 Sep 2006 01:03:26 +0000 (01:03 +0000)]
add seq_forward
its one more step toward getting a sequence to have all of its necessary
sequence location information.

I also changed the test in set_filtered_sequence for the count from 0 to
npos.

17 years agomake really sure load_mupa has a file to parse.
Diane Trout [Sat, 9 Sep 2006 00:08:34 +0000 (00:08 +0000)]
make really sure load_mupa has a file to parse.
Fixes ticket:121
This includes more filesystem checks to make sure we're reading something
that's a file, and instead of doing fstream.eof() this uses the more
general bool converter for the stream. Which I think is equivalent to
fstream::good() (a more general test than fstream::eof() )

17 years agosubsequences now use offsets into the shared_ptr seq_string
Diane Trout [Fri, 8 Sep 2006 22:48:54 +0000 (22:48 +0000)]
subsequences now use offsets into the shared_ptr seq_string
A subsequence created with the Sequence::subseq call will use
the creating sequences shared_ptr, and then just maintains
a seq_start and seq_count to indicate the start and number of bytes
in the subseq. (Yes this means that sometiems the c_str will let you
read more than you should actually be able to. But try not to depend
on that).

17 years agocatch a few more potential unchecked shared_ptr dereferences.
Diane Trout [Fri, 8 Sep 2006 00:33:40 +0000 (00:33 +0000)]
catch a few more potential unchecked shared_ptr dereferences.

17 years agoremove commented out string conversion
Diane Trout [Thu, 7 Sep 2006 22:49:26 +0000 (22:49 +0000)]
remove commented out string conversion
and prevet a possible shared_ptr dereference in c_str()

17 years agoFigured out how to serialize a shared_ptr<string>
Diane Trout [Thu, 7 Sep 2006 00:34:30 +0000 (00:34 +0000)]
Figured out how to serialize a shared_ptr<string>
My previous efforts at serializing a std::string stored as a shared_ptr
appear to have been foiled because the default shared_ptr serializaiton code
was expecting the class serializaiton code to be part of the class member
and alas std::string has out of class serialization.

So the simple solution was to make a subclass of std::string whose only
contribution was to define the serialization code. Also it turns out
there were some problems with the BOOST_SERIALIZATION_BASE_NVP macro
for the seq_string class, however when I expanded it manually, everything
seemed to work.

17 years agogo back to using const char * in seqcomp
Diane Trout [Thu, 7 Sep 2006 00:32:32 +0000 (00:32 +0000)]
go back to using const char * in seqcomp
it appears that the string iterator version is about half as fast
as just using raw const char * pointers.

Hopefully the string pointers won't get moved around behind the scenes
while seqcomp is running. (Currently shouldn't as once a sequence is
set it's supposed to be constant.

17 years agouse shared_ptr to store the sequence string
Diane Trout [Wed, 30 Aug 2006 01:56:09 +0000 (01:56 +0000)]
use shared_ptr to store the sequence string
on the plus side this means there only needs to be one copy of a sequence
string loaded.
on the minus side this currently breaks the boost::serialization code
as I don't know how to get it to serialize a shared_ptr properly.

17 years agoput basepair alphabets into the Sequence class
Diane Trout [Tue, 29 Aug 2006 22:12:31 +0000 (22:12 +0000)]
put basepair alphabets into the Sequence class
thanks to google i found the proper way to initialize a static const string.
I also added the protein 1-letter alphabet. At some point it should be possible
to initialize different alphabets for a sequence.

17 years agogo back to sequence being its own class
Diane Trout [Tue, 29 Aug 2006 04:06:35 +0000 (04:06 +0000)]
go back to sequence being its own class
So my first attempt at getting the sequence tree hierarchy working
ended up imploding in too much complexity. So I decided to try again
in smaller steps. This version just switches back to sequence not being a
string.

one other problem is that iterators didn't seem to be serializable.
so there might be some problem writing a sequence with a tree
of annotated subsequences attached to it out.

17 years agoThere's something wrong with the Qt tests, skip for the moment
Diane Trout [Thu, 31 Aug 2006 07:04:11 +0000 (07:04 +0000)]
There's something wrong with the Qt tests, skip for the moment
the CMake code to generate the moc_ files seems broken with newer versions
of cmake

17 years agofedora needs -lutil for python to build
Diane Trout [Thu, 31 Aug 2006 07:03:44 +0000 (07:03 +0000)]
fedora needs -lutil for python to build

17 years agoneed to #include <cassert> if i'm going to use asserts
Diane Trout [Thu, 31 Aug 2006 06:54:26 +0000 (06:54 +0000)]
need to #include <cassert> if i'm going to use asserts

17 years agoforgot namespace declaration on some conditional code
Diane Trout [Tue, 29 Aug 2006 20:45:57 +0000 (20:45 +0000)]
forgot namespace declaration on some conditional code

17 years agostart trying to figure out where the documentation is
Diane Trout [Thu, 24 Aug 2006 00:42:02 +0000 (00:42 +0000)]
start trying to figure out where the documentation is
on os x determine the bundle path as a first step to finding where we might
have stored qtassistent and the documentation tree.

currently being ignored as i can more easly just launch a webbrowser to
our website.

17 years agoupdate sequence serialization to support the xml archive
Diane Trout [Thu, 24 Aug 2006 00:41:01 +0000 (00:41 +0000)]
update sequence serialization to support the xml archive

17 years agoAllow changing the name for a sequence in the sequence browser.
Diane Trout [Wed, 23 Aug 2006 01:40:40 +0000 (01:40 +0000)]
Allow changing the name for a sequence in the sequence browser.
Doing this required being much more thorough about always using
boost::shared_ptr<>s for GlSequences and Sequences.

When you initalize a shared pointer from something that wasn't specially
allocated for it using new, bad things happen.

This is more of me learning that if one has a temptation to store a reference
don't. Instead use a shared_ptr or similar.

17 years agocatch the other spurious class decoration
Diane Trout [Tue, 22 Aug 2006 06:14:04 +0000 (06:14 +0000)]
catch the other spurious class decoration