Help with colouring scheme and column selection

Dear Jalview Team,

Apologies for what’s probably a trivial issue, but I’m having some problems with editing an alignment in Jalview.

My alignment consists of two sets of proteins, with conserved residues columns for both datasets and various residues columns that are conserved in one or or the other sub-alignment

I’d like to colour just those three classes of columns with three different colours

-Conserved in subaln A and subalnB

-Conserved in sub-aln A

-Conserved in sub-aln B

I get stopped in my tracks as soon as I start to select multiple discontinuous columns and try to assign them a colour, when only the last clicked column gets coloured, the previous ones are unchanged.

image001.png

And lastly, is it possible to colour the conservation using a blue(non-conserved)-to-red(conserved) scale?

Thanks again!

Best wishes,

Nicola

···

Nicola Bordin, PhD

Structural and Molecular Biology

Darwin Building
University College London

Gower Street

WC1E 6BT London UK

orcid.org/0000-0002-6568-9035

Hi Nicola - thanks for posting... it's a good question :slight_smile:

My alignment consists of two sets of proteins, with conserved residues columns for both datasets and various residues columns that are conserved in one or or the other sub-alignment

I’d like to colour just those three classes of columns with three different colours

-Conserved in subaln A and subalnB

-Conserved in sub-aln A

-Conserved in sub-aln B

I get stopped in my tracks as soon as I start to select multiple discontinuous columns and try to assign them a colour, when only the last clicked column gets coloured, the previous ones are unchanged.

Manual selection/picking colours isn't really what Jalview's UI has been designed for. Fortunately, highlighting subgroup conservation is exactly what Jalview has been designed for, so you can at least implicitly show what you want be defining each sub-aln as a group (select all sequences in subaln and press CMD-G or CTRL-G), and then using the per-group shading to show the patterns of conservation per group.

There isn't currently any shading model that takes account of both *overall* and subgroup conservation but we can certainly implement something. That's also the answer to your last question..

And lastly, is it possible to colour the conservation using a blue(non-conserved)-to-red(conserved) scale?

Unfortunately it's not currently possible to change the PID colourscheme colours, since they're hardcoded. You could create a custom scheme though - here's a link to one that you can paste into the Groovy scripting console that adds a new colourscheme to the Colours menu.
http://www.jalview.org/examples/groovy/colourUnconserved.groovy

To give you a hint here's the findColour for the Blosum62 colourscheme:
http://source.jalview.org/gitweb/?p=jalview.git;a=blob;f=src/jalview/schemes/Blosum62ColourScheme.java;h=8188f4d91583c39aeddbbee3d22e4968c477b081;hb=4d959452a9c486b6d94291d8e819036ec19b09ef#l55

Also, the PID colourscheme:
http://source.jalview.org/gitweb/?p=jalview.git;a=blob;f=src/jalview/schemes/PIDColourScheme.java;h=3a5c066397dbc2182061da7d6529ff9551b77e02;hb=4d959452a9c486b6d94291d8e819036ec19b09ef

You can see its pretty straightforward - just look up the colour using either the pid value passed to to the findColour function or you can compute one yourself given the consensus symbols observed at that position (which is what the PID colourscheme does).

sorry its not a quick solution :slightly_smiling_face:
Jim.

PS. there may be an enhancement in development that should allow the 'three state' shading your asking for to be implemented even more quickly. I'll check back with you off list about this!

···

On 24/09/2020 11:19, Bordin, Nicola wrote:

Thanks again!

Best wishes,

Nicola

--

Nicola Bordin, PhD

Structural and Molecular Biology

Darwin Building
University College London

Gower Street

WC1E 6BT London UK

orcid.org/0000-0002-6568-9035 <ORCID;

This body part will be downloaded on demand.

--
-------------------------------------------------------------------
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