[Jalview-discuss] Jalview command line

Jim Procter foreveremain at gmail.com
Mon Feb 7 15:51:23 GMT 2011


On 07/02/2011 14:31, Julien Roux wrote:
> Dear Jalview team,
> I'm new to this mailing list, please excuse me if my question has
> already been answered previously.
>
> I am trying to create a jalview file (.jar) including an amino-acid
> alignment, the associated tree and some annotations.
> To do this, I want to use the command line. I tried:
>
> java -Djava.ext.dirs=/Applications/Jalview/lib -cp
> /Applications/Jalview/Jalview.jar jalview.bin.Jalview -open my_aln.fas
> -colour ZAPPO -annotations my_annot.jalview -tree my_tree.nwk -jalview
> test.jar
>
> This works fine and creates the test.jar file correctly. However, when
> I add the -nodisplay option to do this without User Interface, the
> file test.jar does not include the associated tree. Is this a bug or I
> am doing something wrong?
No  - you aren't doing anything wrong. Including trees in project files
whilst in headless mode is actually an 'unimplemented' capability (aka a
bug, I guess :) ), and I've recorded it as such here:
http://issues.jalview.org/browse/JAL-764

The reason Jalview fails to write out the tree is because the jalview
project IO code is tightly coupled to the Jalview GUI code, and in fact
uses the GUI classes to discover what trees are associated with a
particular alignment. I do plan to fix up this problem - but not for the
next release (ie, not within the next few weeks). I hope that doesn't
inconvenience you!

> I also have 2 other questions:
> - Is it possible to include (again using the command line) the
> nucleotide alignment that corresponds to the AA alignement? I have it
> in a separate fasta file.
not currently, but it's a good feature request. There is a lot of work
to be done improving the dna+protein support in Jalview, which is
currenty oriented towards working with EMBL/uniprot records, rather than
your own nucleotides+translated regions.
> - Is it possible to export a .html file including the alignment and
> the tree and annotations associated? From what I have seen, it seems
> that Jalview only exports the AA alignement + annotations. 
again, a good feature request, although perhaps stepping outside
Jalview's remit, since we provide the JalviewLite applet for doing
combined alignment and tree visualization on a web page. Jalview only
has html generation code for alignments, and doesn't include any means
of generating interactive html for the tree (it only supports PNG and
EPS generation from the GUI, in fact). What kind of functionality do you
need here ?
> Also, is it possible to wrap the alignement using the command line?
Only by passing in a custom jalview.properties file, via the 'props'
argument. You can prepare one by first quitting all your jalview
instances, then making a backup of your current properties file
(~/.jalview_properties ), then start jalview and edit the alignment
display settings in the preferences dialog from the 'Tools' window. You
can test the settings by dragging an alignment into Jalview (after
hitting OK to save your preference settings), to see how they have
affected the initial alignment display. Then, once you're happy with the
default alignment rendering preferences, close jalview, and make a copy
of the current ~/.jalview_properties file before re-instating your old
preferences file from the backup. You can then use this specially
prepared properties file from the command line.

It sounds a faff, but there are around a dozen options controlling the
layout of the alignment, and this is the easiest way to set them all.

thanks for the email, and I hope you'll keep in touch regarding the bug
report about the tree import in headless mode. If you like, you can
register on the jalview issues tracker above, and then 'watch' the bug,
so you get notified about when I or someone else starts fixing it!

Jim.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.compbio.dundee.ac.uk/pipermail/jalview-discuss/attachments/20110207/84cf1389/attachment.html 


More information about the Jalview-discuss mailing list