Discussion:
[Jalview-discuss] Retrieve score for conservation at the individual amino acid level
Romain Studer
2018-11-27 11:35:24 UTC
Permalink
Hi,

I am wondering if we can extract the score to do the colour map from an alignment?

For example, if we colour the alignment with Blosum62 (for example) and we select Colour by conservation, with a threshold of 30,
we will get column that are white, and some columns with various level of blue/purple.
And some outlier AA in those column will be kept still white or less bright. I guess this is based from the AMAS method?

Can we retrieve this information directly from Jalview and output the scores as a 2d matrix (genes x positions)?
Or is there a tool to compute such conservation score at the individual amino acid level?

Thanks,
Romain
Mungo Carstairs (Staff)
2018-11-27 12:37:26 UTC
Permalink
Hi Romain,


I'm not quite sure if you want conservation scores, or BLOSUM scores, or both...


'Colour by Conservation' uses conservation score to 'fade' whatever colour scheme is selected.

http://www.jalview.org/help/html/colourSchemes/conservation.html


The conservation score is per column of the alignment, not per residue.

You can get it by right-clicking on the Conservation annotation label, and 'Export Annotation'.

Jalview's Blosum62 colour scheme is described at http://www.jalview.org/help/html/colourSchemes/blosum.html.


Residue colour depends on whether the residue either matches, or has a positive BLOSUM62 score with, the consensus residue in that column (or residues if there is a tied consensus).

There is no direct way to output these scores, but it would not be hard to write a Groovy script to do that.

Let me know if you would like me to provide one.


I hope that helps!


Best regards,


Mungo






[University of Dundee shield logo]<http://uod.ac.uk/sig-home>

Mungo Carstairs
Jalview Computational Scientist

The Barton Group
Division of Computational Biology

School of Life Sciences

University of Dundee, Dundee, Scotland, UK

www.jalview.org<http://www.jalview.org>

www.compbio.dundee.ac.uk<http://www.compbio.dundee.ac.uk>
***@dundee.ac.uk<mailto:***@dundee.ac.uk>



[University of Dundee Facebook]<http://uod.ac.uk/sig-fb> [University of Dundee Twitter] <http://uod.ac.uk/sig-tw> [University of Dundee LinkedIn] <http://uod.ac.uk/sig-li> [University of Dundee YouTube] <http://uod.ac.uk/sig-yt> [University of Dundee Instagram] <http://uod.ac.uk/sig-ig> [University of Dundee Snapchat] <http://uod.ac.uk/sig-sc>
We're Scottish University of the Year again!<http://uod.ac.uk/sig-strapline>
The Times / Sunday Times Good University Guide 2016 and 2017
________________________________
From: jalview-discuss-***@jalview.org <jalview-discuss-***@jalview.org> on behalf of Romain Studer <***@protonmail.com>
Sent: 27 November 2018 11:35:24
To: jalview-***@jalview.org
Subject: [Jalview-discuss] Retrieve score for conservation at the individual amino acid level

Hi,

I am wondering if we can extract the score to do the colour map from an alignment?

For example, if we colour the alignment with Blosum62 (for example) and we select Colour by conservation, with a threshold of 30,
we will get column that are white, and some columns with various level of blue/purple.
And some outlier AA in those column will be kept still white or less bright. I guess this is based from the AMAS method?

Can we retrieve this information directly from Jalview and output the scores as a 2d matrix (genes x positions)?
Or is there a tool to compute such conservation score at the individual amino acid level?

Thanks,
Romain

The University of Dundee is a registered Scottish Charity, No: SC015096
Mungo Carstairs (Staff)
2018-11-27 13:33:51 UTC
Permalink
Hi Romain,


Try running the attached script in the Jalview Groovy console - it should output residue Blosum62 scores against the alignment consensus.


Regards,


Mungo





[University of Dundee shield logo]<http://uod.ac.uk/sig-home>

Mungo Carstairs
Jalview Computational Scientist

The Barton Group
Division of Computational Biology

School of Life Sciences

University of Dundee, Dundee, Scotland, UK

www.jalview.org<http://www.jalview.org>

www.compbio.dundee.ac.uk<http://www.compbio.dundee.ac.uk>
***@dundee.ac.uk<mailto:***@dundee.ac.uk>



[University of Dundee Facebook]<http://uod.ac.uk/sig-fb> [University of Dundee Twitter] <http://uod.ac.uk/sig-tw> [University of Dundee LinkedIn] <http://uod.ac.uk/sig-li> [University of Dundee YouTube] <http://uod.ac.uk/sig-yt> [University of Dundee Instagram] <http://uod.ac.uk/sig-ig> [University of Dundee Snapchat] <http://uod.ac.uk/sig-sc>
We're Scottish University of the Year again!<http://uod.ac.uk/sig-strapline>
The Times / Sunday Times Good University Guide 2016 and 2017
________________________________
From: jalview-discuss-***@jalview.org <jalview-discuss-***@jalview.org> on behalf of Romain Studer <***@protonmail.com>
Sent: 27 November 2018 11:35:24
To: jalview-***@jalview.org
Subject: [Jalview-discuss] Retrieve score for conservation at the individual amino acid level

Hi,

I am wondering if we can extract the score to do the colour map from an alignment?

For example, if we colour the alignment with Blosum62 (for example) and we select Colour by conservation, with a threshold of 30,
we will get column that are white, and some columns with various level of blue/purple.
And some outlier AA in those column will be kept still white or less bright. I guess this is based from the AMAS method?

Can we retrieve this information directly from Jalview and output the scores as a 2d matrix (genes x positions)?
Or is there a tool to compute such conservation score at the individual amino acid level?

Thanks,
Romain

The University of Dundee is a registered Scottish Charity, No: SC015096
Romain Studer
2018-11-27 15:25:39 UTC
Permalink
Hi Mungo,

This was EXACTLY what I needed. Thank you very much!

As my alignment is huge, writing to Groovy output didn't work well. But saving to a file solved the problem.

Best regards,
Romain

Sent with [ProtonMail](https://protonmail.com) Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Tuesday, November 27, 2018 1:33 PM, Mungo Carstairs (Staff) <***@dundee.ac.uk> wrote:

> Hi Romain,
>
> Try running the attached script in the Jalview Groovy console - it should output residue Blosum62 scores against the alignment consensus.
>
> Regards,
>
> Mungo
>
> Email signature
>
> [University of Dundee shield logo](http://uod.ac.uk/sig-home)
>
> Mungo Carstairs
> Jalview Computational Scientist
>
> The Barton Group
> Division of Computational Biology
>
> School of Life Sciences
>
> University of Dundee, Dundee, Scotland, UK
>
> www.jalview.org
>
> www.compbio.dundee.ac.uk
> ***@dundee.ac.uk
>
> [University of Dundee Facebook](http://uod.ac.uk/sig-fb) [University of Dundee Twitter](http://uod.ac.uk/sig-tw) [University of Dundee LinkedIn](http://uod.ac.uk/sig-li) [University of Dundee YouTube](http://uod.ac.uk/sig-yt) [University of Dundee Instagram](http://uod.ac.uk/sig-ig) [University of Dundee Snapchat](http://uod.ac.uk/sig-sc)
>
> [We're Scottish University of the Year again!](http://uod.ac.uk/sig-strapline)
> The Times / Sunday Times Good University Guide 2016 and 2017
>
> ---------------------------------------------------------------
>
> From: jalview-discuss-***@jalview.org <jalview-discuss-***@jalview.org> on behalf of Romain Studer <***@protonmail.com>
> Sent: 27 November 2018 11:35:24
> To: jalview-***@jalview.org
> Subject: [Jalview-discuss] Retrieve score for conservation at the individual amino acid level
>
> Hi,
>
> I am wondering if we can extract the score to do the colour map from an alignment?
>
> For example, if we colour the alignment with Blosum62 (for example) and we select Colour by conservation, with a threshold of 30,
> we will get column that are white, and some columns with various level of blue/purple.
> And some outlier AA in those column will be kept still white or less bright. I guess this is based from the AMAS method?
>
> Can we retrieve this information directly from Jalview and output the scores as a 2d matrix (genes x positions)?
> Or is there a tool to compute such conservation score at the individual amino acid level?
>
> Thanks,
> Romain
>
> The University of Dundee is a registered Scottish Charity, No: SC015096
Geoff Barton
2018-11-27 23:32:03 UTC
Permalink
Hi Romain,


If it is just the conservation score you are interested in, then other software can give this to you too. You can get this by uploading your alignment to the AMAS server or running AMAS locally, alternatively ALSCRIPT also has a function to generate the conservation score.


Still, Mungo's solution does it nicely in Jalview, so probably best to stick with that!


Geoff.

On 27/11/2018 13:33, Mungo Carstairs (Staff) wrote:

Hi Romain,


Try running the attached script in the Jalview Groovy console - it should output residue Blosum62 scores against the alignment consensus.


Regards,


Mungo





[University of Dundee shield logo]<http://uod.ac.uk/sig-home>

Mungo Carstairs
Jalview Computational Scientist

The Barton Group
Division of Computational Biology

School of Life Sciences

University of Dundee, Dundee, Scotland, UK

www.jalview.org<http://www.jalview.org>

www.compbio.dundee.ac.uk<http://www.compbio.dundee.ac.uk>
***@dundee.ac.uk<mailto:***@dundee.ac.uk>



[University of Dundee Facebook]<http://uod.ac.uk/sig-fb> [University of Dundee Twitter] <http://uod.ac.uk/sig-tw> [University of Dundee LinkedIn] <http://uod.ac.uk/sig-li> [University of Dundee YouTube] <http://uod.ac.uk/sig-yt> [University of Dundee Instagram] <http://uod.ac.uk/sig-ig> [University of Dundee Snapchat] <http://uod.ac.uk/sig-sc>
We're Scottish University of the Year again!<http://uod.ac.uk/sig-strapline>
The Times / Sunday Times Good University Guide 2016 and 2017
________________________________
From: jalview-discuss-***@jalview.org<mailto:jalview-discuss-***@jalview.org> <jalview-discuss-***@jalview.org><mailto:jalview-discuss-***@jalview.org> on behalf of Romain Studer <***@protonmail.com><mailto:***@protonmail.com>
Sent: 27 November 2018 11:35:24
To: jalview-***@jalview.org<mailto:jalview-***@jalview.org>
Subject: [Jalview-discuss] Retrieve score for conservation at the individual amino acid level

Hi,

I am wondering if we can extract the score to do the colour map from an alignment?

For example, if we colour the alignment with Blosum62 (for example) and we select Colour by conservation, with a threshold of 30,
we will get column that are white, and some columns with various level of blue/purple.
And some outlier AA in those column will be kept still white or less bright. I guess this is based from the AMAS method?

Can we retrieve this information directly from Jalview and output the scores as a 2d matrix (genes x positions)?
Or is there a tool to compute such conservation score at the individual amino acid level?

Thanks,
Romain

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


_______________________________________________
Jalview-discuss mailing list
Jalview-***@jalview.org<mailto:Jalview-***@jalview.org>
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-discuss



--
Geoff Barton | Professor of Bioinformatics | Head of Division of Computational Biology
School of Life Sciences | University of Dundee, Scotland, UK | ***@dundee.ac.uk<mailto:***@dundee.ac.uk>
Tel: +44 1382 385860 | www.compbio.dundee.ac.uk<http://www.compbio.dundee.ac.uk> | twitter: @gjbarton


The University of Dundee is registered Scottish charity: No.SC015096


The University of Dundee is a registered Scottish Charity, No: SC015096
Mungo Carstairs (Staff)
2018-11-28 08:59:45 UTC
Permalink
To avoid confusion(?)

- my script generates Blosum62 scores against consensus, not conservation score

- conservation scores can be output from Jalview using Export Annotation<http://www.jalview.org/help/html/menus/alwannotationpanel.html>


Romain, you might want to make a slight adjustment to the script to calculate an average score, rather than a total, if there is a 'joint consensus' (tie).

Example:

Residue L, consensus M, Blosum62 score = 2

Residue L, consensus I, score = 2

Residue L, joint consensus [IM], score = 2 + 2 = 4 // a score of 2 would make more sense


It makes no difference to the colour scheme, as it only cares if the score is positive or not, but an average would be more 'correct' for other analysis.

Just add one line:

score /= consRes.length();
print(score);

Mungo



[University of Dundee shield logo]<http://uod.ac.uk/sig-home>

Mungo Carstairs
Jalview Computational Scientist

The Barton Group
Division of Computational Biology

School of Life Sciences

University of Dundee, Dundee, Scotland, UK

www.jalview.org<http://www.jalview.org>

www.compbio.dundee.ac.uk<http://www.compbio.dundee.ac.uk>
***@dundee.ac.uk<mailto:***@dundee.ac.uk>



[University of Dundee Facebook]<http://uod.ac.uk/sig-fb> [University of Dundee Twitter] <http://uod.ac.uk/sig-tw> [University of Dundee LinkedIn] <http://uod.ac.uk/sig-li> [University of Dundee YouTube] <http://uod.ac.uk/sig-yt> [University of Dundee Instagram] <http://uod.ac.uk/sig-ig> [University of Dundee Snapchat] <http://uod.ac.uk/sig-sc>
We're Scottish University of the Year again!<http://uod.ac.uk/sig-strapline>
The Times / Sunday Times Good University Guide 2016 and 2017
________________________________
From: Geoffrey Barton (Staff)
Sent: 27 November 2018 23:32:03
To: Mungo Carstairs (Staff); jalview-***@jalview.org; Romain Studer
Subject: Re: [Jalview-discuss] Retrieve score for conservation at the individual amino acid level


Hi Romain,


If it is just the conservation score you are interested in, then other software can give this to you too. You can get this by uploading your alignment to the AMAS server or running AMAS locally, alternatively ALSCRIPT also has a function to generate the conservation score.


Still, Mungo's solution does it nicely in Jalview, so probably best to stick with that!


Geoff.

On 27/11/2018 13:33, Mungo Carstairs (Staff) wrote:

Hi Romain,


Try running the attached script in the Jalview Groovy console - it should output residue Blosum62 scores against the alignment consensus.


Regards,


Mungo





[University of Dundee shield logo]<http://uod.ac.uk/sig-home>

Mungo Carstairs
Jalview Computational Scientist

The Barton Group
Division of Computational Biology

School of Life Sciences

University of Dundee, Dundee, Scotland, UK

www.jalview.org<http://www.jalview.org>

www.compbio.dundee.ac.uk<http://www.compbio.dundee.ac.uk>
***@dundee.ac.uk<mailto:***@dundee.ac.uk>



[University of Dundee Facebook]<http://uod.ac.uk/sig-fb> [University of Dundee Twitter] <http://uod.ac.uk/sig-tw> [University of Dundee LinkedIn] <http://uod.ac.uk/sig-li> [University of Dundee YouTube] <http://uod.ac.uk/sig-yt> [University of Dundee Instagram] <http://uod.ac.uk/sig-ig> [University of Dundee Snapchat] <http://uod.ac.uk/sig-sc>
We're Scottish University of the Year again!<http://uod.ac.uk/sig-strapline>
The Times / Sunday Times Good University Guide 2016 and 2017
________________________________
From: jalview-discuss-***@jalview.org<mailto:jalview-discuss-***@jalview.org> <jalview-discuss-***@jalview.org><mailto:jalview-discuss-***@jalview.org> on behalf of Romain Studer <***@protonmail.com><mailto:***@protonmail.com>
Sent: 27 November 2018 11:35:24
To: jalview-***@jalview.org<mailto:jalview-***@jalview.org>
Subject: [Jalview-discuss] Retrieve score for conservation at the individual amino acid level

Hi,

I am wondering if we can extract the score to do the colour map from an alignment?

For example, if we colour the alignment with Blosum62 (for example) and we select Colour by conservation, with a threshold of 30,
we will get column that are white, and some columns with various level of blue/purple.
And some outlier AA in those column will be kept still white or less bright. I guess this is based from the AMAS method?

Can we retrieve this information directly from Jalview and output the scores as a 2d matrix (genes x positions)?
Or is there a tool to compute such conservation score at the individual amino acid level?

Thanks,
Romain

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


_______________________________________________
Jalview-discuss mailing list
Jalview-***@jalview.org<mailto:Jalview-***@jalview.org>
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-discuss



--
Geoff Barton | Professor of Bioinformatics | Head of Division of Computational Biology
School of Life Sciences | University of Dundee, Scotland, UK | ***@dundee.ac.uk<mailto:***@dundee.ac.uk>
Tel: +44 1382 385860 | www.compbio.dundee.ac.uk<http://www.compbio.dundee.ac.uk> | twitter: @gjbarton


The University of Dundee is registered Scottish charity: No.SC015096


The University of Dundee is a registered Scottish Charity, No: SC015096
Romain Studer
2018-11-28 14:09:05 UTC
Permalink
Hi Mungo,

Yes, I needed the scores against the consensus, which was provided by your script.
I was already able to extract the conservation score from Jalview.

Many thanks for your help,
Romain

Sent with [ProtonMail](https://protonmail.com) Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Wednesday, November 28, 2018 8:59 AM, Mungo Carstairs (Staff) <***@dundee.ac.uk> wrote:

> To avoid confusion(?)
>
> - my script generates Blosum62 scores against consensus, not conservation score
>
> - conservation scores can be output from Jalview using [Export Annotation](http://www.jalview.org/help/html/menus/alwannotationpanel.html)
>
> Romain, you might want to make a slight adjustment to the script to calculate an average score, rather than a total, if there is a 'joint consensus' (tie).
>
> Example:
>
> Residue L, consensus M, Blosum62 score = 2
>
> Residue L, consensus I, score = 2
>
> Residue L, joint consensus [IM], score = 2 + 2 = 4 // a score of 2 would make more sense
>
> It makes no difference to the colour scheme, as it only cares if the score is positive or not, but an average would be more 'correct' for other analysis.
>
> Just add one line:
>
> score /= consRes.length();
> print(score);
>
> Mungo
>
> [University of Dundee shield logo](http://uod.ac.uk/sig-home)
>
> Mungo Carstairs
> Jalview Computational Scientist
>
> The Barton Group
> Division of Computational Biology
>
> School of Life Sciences
>
> University of Dundee, Dundee, Scotland, UK
>
> www.jalview.org
>
> www.compbio.dundee.ac.uk
> ***@dundee.ac.uk
>
> [University of Dundee Facebook](http://uod.ac.uk/sig-fb) [University of Dundee Twitter](http://uod.ac.uk/sig-tw) [University of Dundee LinkedIn](http://uod.ac.uk/sig-li) [University of Dundee YouTube](http://uod.ac.uk/sig-yt) [University of Dundee Instagram](http://uod.ac.uk/sig-ig) [University of Dundee Snapchat](http://uod.ac.uk/sig-sc)
>
> [We're Scottish University of the Year again!](http://uod.ac.uk/sig-strapline)
> The Times / Sunday Times Good University Guide 2016 and 2017
> ---------------------------------------------------------------
>
> From: Geoffrey Barton (Staff)
> Sent: 27 November 2018 23:32:03
> To: Mungo Carstairs (Staff); jalview-***@jalview.org; Romain Studer
> Subject: Re: [Jalview-discuss] Retrieve score for conservation at the individual amino acid level
>
> Hi Romain,
>
> If it is just the conservation score you are interested in, then other software can give this to you too. You can get this by uploading your alignment to the AMAS server or running AMAS locally, alternatively ALSCRIPT also has a function to generate the conservation score.
>
> Still, Mungo's solution does it nicely in Jalview, so probably best to stick with that!
>
> Geoff.
>
> On 27/11/2018 13:33, Mungo Carstairs (Staff) wrote:
>
>> Hi Romain,
>>
>> Try running the attached script in the Jalview Groovy console - it should output residue Blosum62 scores against the alignment consensus.
>>
>> Regards,
>>
>> Mungo
>>
>> Email signature
>>
>> [University of Dundee shield logo](http://uod.ac.uk/sig-home)
>>
>> Mungo Carstairs
>> Jalview Computational Scientist
>>
>> The Barton Group
>> Division of Computational Biology
>>
>> School of Life Sciences
>>
>> University of Dundee, Dundee, Scotland, UK
>>
>> www.jalview.org
>>
>> www.compbio.dundee.ac.uk
>> ***@dundee.ac.uk
>>
>> [University of
>> Dundee Facebook](http://uod.ac.uk/sig-fb) [University of
>> Dundee Twitter](http://uod.ac.uk/sig-tw) [University of
>> Dundee LinkedIn](http://uod.ac.uk/sig-li) [University of
>> Dundee YouTube](http://uod.ac.uk/sig-yt) [University of
>> Dundee Instagram](http://uod.ac.uk/sig-ig) [University of
>> Dundee Snapchat](http://uod.ac.uk/sig-sc)
>>
>> [We're Scottish University of the Year again!](http://uod.ac.uk/sig-strapline)
>> The Times / Sunday Times Good University Guide 2016 and 2017
>>
>> ---------------------------------------------------------------
>>
>> From: jalview-discuss-***@jalview.org [<jalview-discuss-***@jalview.org>](mailto:jalview-discuss-***@jalview.org) on behalf of Romain Studer [<***@protonmail.com>](mailto:***@protonmail.com)
>> Sent: 27 November 2018 11:35:24
>> To: jalview-***@jalview.org
>> Subject: [Jalview-discuss] Retrieve score for conservation at the individual amino acid level
>>
>> Hi,
>>
>> I am wondering if we can extract the score to do the colour map from an alignment?
>>
>> For example, if we colour the alignment with Blosum62 (for example) and we select Colour by conservation, with a threshold of 30,
>> we will get column that are white, and some columns with various level of blue/purple.
>> And some outlier AA in those column will be kept still white or less bright. I guess this is based from the AMAS method?
>>
>> Can we retrieve this information directly from Jalview and output the scores as a 2d matrix (genes x positions)?
>> Or is there a tool to compute such conservation score at the individual amino acid level?
>>
>> Thanks,
>> Romain
>>
>> The University of Dundee is a registered Scottish Charity, No: SC015096
>>
>> _______________________________________________
>> Jalview-discuss mailing list
>> Jalview-***@jalview.org
>>
>> http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-discuss
>
> --
> Geoff Barton | Professor of Bioinformatics | Head of Division of Computational Biology
> School of Life Sciences | University of Dundee, Scotland, UK |
> ***@dundee.ac.uk
> Tel: +44 1382 385860 |
> www.compbio.dundee.ac.uk
> | twitter: @gjbarton
>
> The University of Dundee is registered Scottish charity: No.SC015096
>
> The University of Dundee is a registered Scottish Charity, No: SC015096
Loading...