Hi Gershon. Thanks for taking the time to think about this.
On 18/03/2012 12:44, Gershon Celniker wrote:
You mentioned that there is a need for a few minor patches for this
Node (ancestral) sequence - feature. i already started to look on
Jalviewlite source and seems very organized
and well documented. Now we are short in time and our best interest to
make it happen the sooner the better because we need it for our new
FastML server.
i am familiar with Java and with your assist i am positive i could
write these patches.
OK - that's really good to hear !
The first steps are to register on http://issues.jalview.org, and then
see if you can checkout the jalview source via
git clone http://source.jalview.org/git/jalview.git
Since you're interested in making a quick patch, I'd suggest working off
the v2.7 branch, rather than the v2.8 branch which is still under
development. I'm assuming you're not familiar with git, and have
provided below all the necessary commands to create a new branch of the
2_7 source that will allow you to easily patch it. If you'd prefer to
work another way, feel free!
git checkout Release_2_7_Branch
git branch -b JAL-1055_ancestral_nodes
This will create a new local branch that you can work in. I use the
git-flow formalism for working with the jalview source, so when your
happy with your new features, do the following:
(do commits to branch with git commit)
git checkout Release_2_7_Branch
git merge JAL-1055_ancestral_nodes --squash --no-ff
I'll then give your issues.jalview.org username write access to the
repository so you can push the changes, alternately, you can send me a
patch and I'll commit it to the repository myself.
As for developing, you should be able to use the cloned directory as a
project in your favourite java dev. I use eclipse - and you should be
able to import the project from the file system. Eclipse should use the
ant build.xml to build jalview. There's also a netbeans project, but
that might not work straight out of the box. For testing, use the applet
launcher with arguments as you would normally use for the applet tag in
the web page, and if you like, you could also add in another example to
the 'examples' directory demonstrating the ancestral node/alignment
connection.
Ok - now the patch. There are two parts to this:
1. Patch the node/sequence association routine in the tree viewer so
that you can associate internal nodes with alignment sequences.
The association happens in the constructor :
jalview.analysis.NJTree(SequenceI[] seqs, NewickFile treefile)
All you need to do is make Jalview loop over the internal nodes, too,
and find a match for those nodes in the sequence set.
2. Patch the mousePressed handler method in the TreeCanvas so it
includes the internal nodes when :
* a node is clicked - this should select the associated ancestral sequence
* the tree area is clicked so the tree is partitioned and partitions
include the ancestral sequences for the subtrees.
Finally, you might want to consider the following:
3. Add an option in the 'View' menu of the tree allowing the user to
disable the ancestral sequence associations when interacting with the
tree and so recover the original jalview v2.7 behaviour. Sometimes, only
the 'real' sequences may be desired - although I think a bit of
experimentation will be needed to work out when this is really the case
- there might also be a need to mark these sequences in the alignment
view too, enabling the user to select them or exclude them from some
analyses.
Oh - I've also added you to the jalview-dev email list, which I've also
cc'ed this message to.
Let me know how you get on !
Jim.
_______________________________________________
Jalview-dev mailing list
[email protected]
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev