Jalview command line arguments

Hi there!

I’m looking for a solution to the following problem:
When aiming to generate multiple png figures of different MSAs, one prefers to rely on the command line usage of Jalview. Using the feature file (-features argument) should help to define user-specific annotations on an MSA. My goal is to highlight 2 columns with a random color (e.g. red) in each alignment. Although the feature file enables me to color amino acids in each sequence at the defined positions, I’m running into trouble when there are gaps at these positions of interest. The coloring is then shifted to the neighboring amino acids…
Did someone have the same issue??

Sunny greetings,
Martina

···

Martina Weigl
PhD candidate, Bioinformatics
Wissenschaftszentrum Weihenstephan, Technische Universität München
Maximus-von-Imhof-Forum 3,
85354 Freising, Germany
Email: martina.weigl@mytum.de

Hi Martina

I'm looking for a solution to the following problem:
When aiming to generate multiple png figures of different MSAs, one
prefers to rely on the command line usage of Jalview. Using the
feature file (-features argument) should help to define user-specific
annotations on an MSA. My goal is to highlight 2 columns with a random
color (e.g. red) in each alignment.

This is best solved with an alignment annotation file - define a group
with the desired colour on the columns of interest. See
http://www.jalview.org/help/html/features/annotationsFormat.html

Although the feature file enables me to color amino acids in each
sequence at the defined positions, I'm running into trouble when there
are gaps at these positions of interest. The coloring is then shifted
to the neighboring amino acids...

yes - that's because features are defined on the sequence positions, not
alignment column positions - so gaps will never be coloured.

Let us know if this works for you!
Jim.

···

On 17/08/2017 12:38, Martina Weigl wrote:

--
-------------------------------------------------------------------
Dr JB Procter, Jalview Coordinator, The Barton Group
Division of Computational Biology, School of Life Sciences
University of Dundee, Dundee DD1 5EH, UK.
+44 1382 388734 | www.jalview.org | www.compbio.dundee.ac.uk

Thanks already for the quick reply!

Here is the annotation file I’d suggest to enter when e.g. coloring the columns 2-5 in all sequences:

···

JALVIEW_ANNOTATION
#SEQUENCE_GROUP GROUP_Name ColStart ColStop Sequences
SEQUENCE_GROUP Group_A 2 5 *
PROPERTIES Group_A colour=Clustal

This results, although, in an extra “sequence” line and the coloring is completely missing. I’d be grateful if we could figure this out together.

Best,

Martina

Martina Weigl
PhD candidate, Bioinformatics
Wissenschaftszentrum Weihenstephan, Technische Universität München
Maximus-von-Imhof-Forum 3,
85354 Freising, Germany
Email: martina.weigl@mytum.de


From: jalview-discuss-bounces@jalview.org jalview-discuss-bounces@jalview.org on behalf of Jim Procter jprocter@compbio.dundee.ac.uk
Sent: Thursday, August 17, 2017 1:49:29 PM
To: jalview-discuss@jalview.org
Subject: Re: [Jalview-discuss] Jalview command line arguments

Hi Martina

On 17/08/2017 12:38, Martina Weigl wrote:

I’m looking for a solution to the following problem:
When aiming to generate multiple png figures of different MSAs, one
prefers to rely on the command line usage of Jalview. Using the
feature file (-features argument) should help to define user-specific
annotations on an MSA. My goal is to highlight 2 columns with a random
color (e.g. red) in each alignment.
This is best solved with an alignment annotation file - define a group
with the desired colour on the columns of interest. See
http://www.jalview.org/help/html/features/annotationsFormat.html
Although the feature file enables me to color amino acids in each
sequence at the defined positions, I’m running into trouble when there
are gaps at these positions of interest. The coloring is then shifted
to the neighboring amino acids…
yes - that’s because features are defined on the sequence positions, not
alignment column positions - so gaps will never be coloured.

Let us know if this works for you!
Jim.

Dr JB Procter, Jalview Coordinator, The Barton Group
Division of Computational Biology, School of Life Sciences
University of Dundee, Dundee DD1 5EH, UK.
+44 1382 388734 | www.jalview.org | www.compbio.dundee.ac.uk


Jalview-discuss mailing list
Jalview-discuss@jalview.org
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-discuss

Hi Martina - JALVIEW_ANNOTATION is a tab separated file format - I think
your file might have spaces instead.

Try this one - you'll need to search/replace the '\t' with tab characters!

JALVIEW_ANNOTATION
# create a red box on any alignment from column 5 to 25
SEQUENCE_GROUP\trandom\t5\t25\t*
PROPERTIES\trandom\tcolour=red\toutlineColour=red

Hopefully this will work for you!

This results, although, in an extra "sequence" line and the coloring
is completely missing. I'd be grateful if we could figure this out
together.

By chance, you've helped me uncover a bug in Jalview 2.10.2 :smiley: if the
sequence group isn't given a name and there are spaces instead of tabs,
the file is mistakenly read as 'PFAM' and a new sequence added (you
should have received a warning about a malformed annotation file
instead...). Even worse, when you try to delete the sequence - Jalview
won't let you (due to another bug...).

back to work I guess :slight_smile:
Jim.

···

On 17/08/2017 14:11, Martina Weigl wrote:

--
-------------------------------------------------------------------
Dr JB Procter, Jalview Coordinator, The Barton Group
Division of Computational Biology, School of Life Sciences
University of Dundee, Dundee DD1 5EH, UK.
+44 1382 388734 | www.jalview.org | www.compbio.dundee.ac.uk

The University of Dundee is a registered Scottish Charity, No: SC015096

That’s right, forgot to change my editor settings!

One last thing that came into my mind is about improving the readability of the output png.

What kind of property file are you referring to on this explanation side (http://www.jalview.org/help/html/features/clarguments.html)?

In detail, I want to remove the Jalview comment behind each sequence identifier + add some extra space between the ids and the alignment. Where can I specify those things?

Many thanks in advance,

Martina

Martina Weigl
PhD candidate, Bioinformatics
Wissenschaftszentrum Weihenstephan, Technische Universität München
Maximus-von-Imhof-Forum 3,
85354 Freising, Germany
Email: martina.weigl@mytum.de

···

From: jalview-discuss-bounces@jalview.org jalview-discuss-bounces@jalview.org on behalf of James Procter j.procter@dundee.ac.uk
Sent: Thursday, August 17, 2017 3:40:52 PM
To: jalview-discuss@jalview.org
Subject: Re: [Jalview-discuss] Jalview command line arguments

Hi Martina - JALVIEW_ANNOTATION is a tab separated file format - I think
your file might have spaces instead.

Try this one - you’ll need to search/replace the ‘\t’ with tab characters!

JALVIEW_ANNOTATION

create a red box on any alignment from column 5 to 25

SEQUENCE_GROUP\trandom\t5\t25\t*
PROPERTIES\trandom\tcolour=red\toutlineColour=red

Hopefully this will work for you!

On 17/08/2017 14:11, Martina Weigl wrote:

This results, although, in an extra “sequence” line and the coloring
is completely missing. I’d be grateful if we could figure this out
together.
By chance, you’ve helped me uncover a bug in Jalview 2.10.2 :smiley: if the
sequence group isn’t given a name and there are spaces instead of tabs,
the file is mistakenly read as ‘PFAM’ and a new sequence added (you
should have received a warning about a malformed annotation file
instead…). Even worse, when you try to delete the sequence - Jalview
won’t let you (due to another bug…).

back to work I guess :slight_smile:
Jim.

Dr JB Procter, Jalview Coordinator, The Barton Group
Division of Computational Biology, School of Life Sciences
University of Dundee, Dundee DD1 5EH, UK.
+44 1382 388734 | www.jalview.org | www.compbio.dundee.ac.uk

The University of Dundee is a registered Scottish Charity, No: SC015096


Jalview-discuss mailing list
Jalview-discuss@jalview.org
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-discuss

Glad it worked out, Martina.

One last thing that came into my mind is about improving the readability of the output png.

What kind of property file are you referring to on this explanation side (http://www.jalview.org/help/html/features/clarguments.html)?

The properties file is a Jalview user settings file. By default, Jalview saves your user settings in ~/.jalview_properties - so if you configure the default layout for opening an alignment just the way you want it for PNG generation via the Tools->Preferences dialog, then after hitting OK (which updates the .jalview_properties file) you can make a copy to pass in via the -props argument in your batch PNG generation.

In detail, I want to remove the Jalview comment behind each sequence identifier + add some extra space between the ids and the alignment. Where can I specify those things?

You can specify the width of the ID column for PNG export with a line in the property file - e.g. :
FIGURE_FIXEDIDWIDTH=400
(this probably ought to be documented somewhere!)

One last thing: when preparing your own property files, make sure you have a newline at the end - otherwise Jalview won’t read the last property in the file.

Happy jalviewing…
Jim.

···

On 17/08/2017 15:36, Martina Weigl wrote: