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

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

···

Email signature

University of Dundee shield logo

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
g.m.carstairs@dundee.ac.uk

University of Dundee FacebookUniversity of Dundee TwitterUniversity of Dundee LinkedInUniversity of Dundee YouTubeUniversity of Dundee InstagramUniversity of Dundee Snapchat
We’re Scottish University of the Year again!
The Times / Sunday Times Good University Guide 2016 and 2017


From: jalview-discuss-bounces@jalview.org jalview-discuss-bounces@jalview.org on behalf of Romain Studer evosite3d@protonmail.com
Sent: 27 November 2018 11:35:24
To: jalview-discuss@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

Hi Romain,

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

Regards,

Mungo

blosumScores.groovy (838 Bytes)

···

Email signature

University of Dundee shield logo

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
g.m.carstairs@dundee.ac.uk

University of Dundee FacebookUniversity of Dundee TwitterUniversity of Dundee LinkedInUniversity of Dundee YouTubeUniversity of Dundee InstagramUniversity of Dundee Snapchat
We’re Scottish University of the Year again!
The Times / Sunday Times Good University Guide 2016 and 2017


From: jalview-discuss-bounces@jalview.org jalview-discuss-bounces@jalview.org on behalf of Romain Studer evosite3d@protonmail.com
Sent: 27 November 2018 11:35:24
To: jalview-discuss@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

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 Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Tuesday, November 27, 2018 1:33 PM, Mungo Carstairs (Staff) g.m.carstairs@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

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
g.m.carstairs@dundee.ac.uk

University of Dundee FacebookUniversity of Dundee TwitterUniversity of Dundee LinkedInUniversity of Dundee YouTubeUniversity of Dundee InstagramUniversity of Dundee Snapchat

We’re Scottish University of the Year again!
The Times / Sunday Times Good University Guide 2016 and 2017


From: jalview-discuss-bounces@jalview.org jalview-discuss-bounces@jalview.org on behalf of Romain Studer evosite3d@protonmail.com
Sent: 27 November 2018 11:35:24
To: jalview-discuss@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

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.

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

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
g.m.carstairs@dundee.ac.uk

University of
                          Dundee FacebookUniversity of
                          Dundee TwitterUniversity of
                          Dundee LinkedInUniversity of
                          Dundee YouTubeUniversity of
                          Dundee InstagramUniversity of
                          Dundee Snapchat
We’re Scottish University of the Year again!
The Times / Sunday Times Good University Guide 2016 and 2017


From: jalview-discuss-bounces@jalview.org jalview-discuss-bounces@jalview.org on behalf of Romain Studer evosite3d@protonmail.com
Sent: 27 November 2018 11:35:24
To: jalview-discuss@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-discuss@jalview.org](mailto:Jalview-discuss@jalview.org)
[http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-discuss](http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-discuss)

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

···

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

-- 
Geoff Barton | Professor of Bioinformatics | Head of Division of Computational Biology   
School of Life Sciences | University of Dundee, Scotland, UK | [g.j.barton@dundee.ac.uk](mailto:g.j.barton@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 

To avoid confusion(?)

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

  • conservation scores can be output from Jalview using Export Annotation

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

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
g.m.carstairs@dundee.ac.uk

University of Dundee FacebookUniversity of Dundee TwitterUniversity of Dundee LinkedInUniversity of Dundee YouTubeUniversity of Dundee InstagramUniversity of Dundee Snapchat
We’re Scottish University of the Year again!
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-discuss@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

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
g.m.carstairs@dundee.ac.uk

University of
                          Dundee FacebookUniversity of
                          Dundee TwitterUniversity of
                          Dundee LinkedInUniversity of
                          Dundee YouTubeUniversity of
                          Dundee InstagramUniversity of
                          Dundee Snapchat
We’re Scottish University of the Year again!
The Times / Sunday Times Good University Guide 2016 and 2017

From: jalview-discuss-bounces@jalview.org jalview-discuss-bounces@jalview.org on behalf of Romain Studer evosite3d@protonmail.com
Sent: 27 November 2018 11:35:24
To: jalview-discuss@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-discuss@jalview.org](mailto:Jalview-discuss@jalview.org)
[http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-discuss](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 | [g.j.barton@dundee.ac.uk](mailto:g.j.barton@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


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 Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Wednesday, November 28, 2018 8:59 AM, Mungo Carstairs (Staff) g.m.carstairs@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

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

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
g.m.carstairs@dundee.ac.uk

University of Dundee FacebookUniversity of Dundee TwitterUniversity of Dundee LinkedInUniversity of Dundee YouTubeUniversity of Dundee InstagramUniversity of Dundee Snapchat

We’re Scottish University of the Year again!
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-discuss@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

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
g.m.carstairs@dundee.ac.uk

University of                           Dundee FacebookUniversity of                           Dundee TwitterUniversity of                           Dundee LinkedInUniversity of                           Dundee YouTubeUniversity of                           Dundee InstagramUniversity of                           Dundee Snapchat

We’re Scottish University of the Year again!
The Times / Sunday Times Good University Guide 2016 and 2017


From: jalview-discuss-bounces@jalview.org jalview-discuss-bounces@jalview.org on behalf of Romain Studer evosite3d@protonmail.com
Sent: 27 November 2018 11:35:24
To: jalview-discuss@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-discuss@jalview.org](mailto:Jalview-discuss@jalview.org)
[http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-discuss](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 | [g.j.barton@dundee.ac.uk](mailto:g.j.barton@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