Automate overview window

Hi Jalviewers,

A quick question about Overview window. I am using the latest full
version of Jalview (not the applet) to quickly inspect a list of a few
hundred alignments. I would like to know if it's possible to automate
the process of doing a snapshot of the Overview window. Here is what I
do now:

for file in `ls *clustalw`; do java
-Djava.ext.dirs=/home/avilella/9_opl/jalview/Jalview/lib -cp
/home/avilella/9_opl/jalview/Jalview/jalview.jar jalview.bin.Jalview
-open $file; done

Then I manually click on View->Overview Window, maximize the window,
and take a screenshot of it. Then close jalview, and the next
alignment opens up.

Is there a option to automatically open the overview window when I
call it from the command line? Something like:

-open $file -overview_window

Looking forward to hearing from you,

Cheers,

Albert.

Hello Albert, thanks for the interesting question! :slight_smile:

A quick question about Overview window. I am using the latest full
version of Jalview (not the applet) to quickly inspect a list of a few
hundred alignments. I would like to know if it's possible to automate
the process of doing a snapshot of the Overview window.

There's no command line option to do what you ask, but it should be possible to automate this - firstly using a jalview properties file with a line containing 'SHOW_OVERVIEW=true' (which you'd pass in via the 'props' argument) and a bit of groovy script (passed in using the -groovy option) that would maximise the overview window.

Before I go further, though, I'm slightly curious as to why you want a snapshot of the overview window. Presumably you want to generate an overview of the set of alignments, but I wonder if you might not get the same effect by using Jalview's existing PNG output command line option and then rescaling the images to get a set of standard size thumbnails ? You could even do the second step by embedding the images in an html page where you specify the width and height as a standard size.

Jim.

···

--
-------------------------------------------------------------------
J. B. Procter (JALVIEW/ENFIN) Barton Bioinformatics Research Group
Phone/Fax:+44(0)1382 388734/345764 http://www.compbio.dundee.ac.uk
The University of Dundee is a Scottish Registered Charity, No. SC015096.

Hi Jim,

Ah, yes! The PNG output is exactly what I need. I wasn't aware of it.

So say I have a directory with the files, what's the commandline to
call jalview and generate the PNGs of the overviews?

The next question it's going to be, how do I generate the PNG overview
with the associated tree at the left-hand side of the image?

Cheers,

Albert.

···

On Mon, Jan 11, 2010 at 3:14 PM, Jim Procter <jprocter@compbio.dundee.ac.uk> wrote:

Hello Albert, thanks for the interesting question! :slight_smile:

A quick question about Overview window. I am using the latest full
version of Jalview (not the applet) to quickly inspect a list of a few
hundred alignments. I would like to know if it's possible to automate
the process of doing a snapshot of the Overview window.

There's no command line option to do what you ask, but it should be possible
to automate this - firstly using a jalview properties file with a line
containing 'SHOW_OVERVIEW=true' (which you'd pass in via the 'props'
argument) and a bit of groovy script (passed in using the -groovy option)
that would maximise the overview window.

Before I go further, though, I'm slightly curious as to why you want a
snapshot of the overview window. Presumably you want to generate an overview
of the set of alignments, but I wonder if you might not get the same effect
by using Jalview's existing PNG output command line option and then
rescaling the images to get a set of standard size thumbnails ? You could
even do the second step by embedding the images in an html page where you
specify the width and height as a standard size.

Jim.

--
-------------------------------------------------------------------
J. B. Procter (JALVIEW/ENFIN) Barton Bioinformatics Research Group
Phone/Fax:+44(0)1382 388734/345764 http://www.compbio.dundee.ac.uk
The University of Dundee is a Scottish Registered Charity, No. SC015096.

Yes, sorry, I want a PNG image file of the alignment with defined
dimensions in pixels. Something like "do 1000 PNGs of size 1200x800px
for the 1000 clustalw files in this directory".

The tree thingy is optional.

···

On Tue, Jan 19, 2010 at 10:33 AM, Jim Procter <jprocter@compbio.dundee.ac.uk> wrote:

Hi Albert. From you silence, I thought you'd forgotten all about this - but
clearly you were just thinking about ways of making the task even more
complex :slight_smile:

I guess the first question from my reply still stands here - do you really
need the overview image, or would a rescaled version of the normal PNG
output be ok ?

Secondly, do you want to calculate the tree on the fly ? Or do you already
have a tree in mind that you just want to generate an image from ?

Jim.

On 19/01/2010 09:56, Albert Vilella wrote:

Hi Jim,

Ah, yes! The PNG output is exactly what I need. I wasn't aware of it.

So say I have a directory with the files, what's the commandline to
call jalview and generate the PNGs of the overviews?

The next question it's going to be, how do I generate the PNG overview
with the associated tree at the left-hand side of the image?

Cheers,

Albert.

--
-------------------------------------------------------------------
J. B. Procter (JALVIEW/ENFIN) Barton Bioinformatics Research Group
Phone/Fax:+44(0)1382 388734/345764 http://www.compbio.dundee.ac.uk
The University of Dundee is a Scottish Registered Charity, No. SC015096.