Hi Paolo.
On 03/04/2012 10:36, Paolo Di Tommaso wrote:
I think easter holiday it will a good timeframe to start implementing
the T-Coffee score rendering ;)
great !
Is this the source repository for Jalview
/http://source.jalview.org/git/jalview.git / isn't it ?
yep. However, you can also work with
https://source.jalview.org/git/jalview.git with your issues.jalview.org
username and password.
The version of Jalview code to work from is the develop branch - this is
the one that will become the next release. If you clone the repository
and create a new local branch off that branch, you should be able to
rebase your work on top of mine as I commit on to the development
branch. This is the 'gitflow' model - where every feature is developed
in its own branch that - if local to you - can be rebased on or
otherwise merged with any incoming changes on the parent branch. When
the feature is ready to be released, its branch is then merged onto the
develop or release branch where it is needed. (there's more info and a
link about gitflow in this email
http://www.jalview.org/pipermail/jalview-dev/2012-January/000205.html).
Moreover could you provide me some starting tips, based on we said in
the previous days (for example which are the main classes on which I
could work, the entry point class, how to setup a test environment, etc)
Your first step should be to checkout the source and see if you can get
it to build... in principle, if you work in eclipse, it should import as
a java project and building should 'just work' - but there is a little
wrinkle: if the applet classes are not compiling due to a missing class,
then you need to add the 'plugin.jar' library that sits inside your
JRE's lib directory to the project's build classpath.
[ as an aside, if you use netbeans - there a netbeans project in the
directory (nbbuild.xml) but I suspect it might have a few out of date
dependencies that need renaming to the latest jar in the lib/ directory].
The main entry point for the applet is the one that is called in the
applet tag - jalview.bin.JalviewLite. You should be able to set up an
applet launch configuration (or appletviewer page) that loads an
alignment, you can then add in the new parameter that specifies the
t-coffee score file. The ant script that comes with jalview includes
everything needed to make the jalviewApplet.jar if you want to package
the applet up. In particular, 'pubapplet' will make a copy of the
'examples' directory under the build directory (called 'dist' by
default) and put a copy of the applet jar there. You can then point a
web browser at a page in that directory to test the applet (note - if
you need to do any ajax stuff, you should start a jetty web server using
the jetty maven module following the instructions here:
http://maven.apache.org/plugins/maven-war-plugin/examples/rapid-testing-jetty6-plugin.html
).
The general series of implementation steps will be something like:
1. create a new class in the jalview.io package to read the t-coffee
score matrix for the alignment positions. This would be called in
jalview.bin.JalviewLite after the alignment was loaded in order to add
the annotation.
2. create a new colourscheme in jalview.schemes for the T-coffee score
colourscheme. These are called by the jalview.appletgui.SequenceRenderer
class to render the visible portions of the sequence.
3. make sure the colourscheme is added to the colours menu whenever
t-coffee scores are available.
Initially, I'd take a look at the execution path from
jalview.bin.JalviewLite to when a jalview.appletgui.AlignFrame is
created and displayed, and try to understand how the different
colourschemes are called by the SequenceRenderer class.
Once you've done that, we can talk about the best way to implement this
colourscheme. The hardest bit is implementing an efficient lookup to
find the t-coffee score for a particular position in a sequence, but for
a first attempt, I shouldn't worry about this. The easiest path will be
to store the T-coffee scores for each sequence as a
jalview.datamodel.AlignmentAnnotation object - which can be associated
with a SequenceI reference. The ColourScheme implementation should then
find the colour for a position for a sequence in the alignment according
to the associated AlignmentAnnotation object for a sequence.
The final nuance for the colourscheme is to colour the sequence IDs
according to the per-sequence T-Coffee score. Currently, Jalview has no
support for shading sequence IDs according to some value, but there is
support for colouring sequence IDs as specified in a
jalview.datamodel.SequenceGroup (which are created from alignment
annotation files and when the user clicks in a tree to subdivide the
alignment).
All this should keep you busy over Easter ! Feel free to create
subtasks on issues.jalview.org to help document your progress. I've
started some here: http://issues.jalview.org/browse/JAL-1065
Remember, if you include the JIRA issue number for a task in a commit
(e.g. JAL-1065 for this feature request) then the commits will be
visible when they are pushed to source.jalview.org.
Jim.
ps. I remembered this morning that you originally emailed the list about
making it possible to show the associated tree for an alignment by
selecting a menu item like 'show tree' -
http://issues.jalview.org/browse/JAL-1039
.. you'll probably think of a few ways to do that as you look through
the Jalview code.
_______________________________________________
Jalview-dev mailing list
[email protected]
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev