<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
Hi Oriol,<br>
<br>
Are you getting an error like 'Can't call method "get_prediction" on
an undefined value'? If so, test you have a matrix pediction before
using it. This would work:<br>
<br>
if (defined $matrix_prediction){<br>
my ($prediction) = $matrix_prediction->get_prediction(1, V)
;<br>
print "$prediction\n";<br>
}<br>
<br>
Sarah<br>
<br>
<div class="moz-cite-prefix">On 11/03/2015 07:05, ori wrote:<br>
</div>
<blockquote cite="mid:DUB109-W179F8FCC65D22BCE3A7FBFB4190@phx.gbl"
type="cite">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr">Hi Sarah,
<div>Thank you, I was just worried about the difference. Yes, I
am aware of that and I wanted HumVar, that's why I am not
specifying anything. </div>
<div>By the way, do you know how to prevent the API from closing
when it finds an error (for example, the matrix for this ID
doesn't exist and then it quits). If I am looping through some
IDs, and one of them is not found, the script stops.</div>
<div><br>
</div>
<div>Thank you, </div>
<div><br>
</div>
<div>Oriol</div>
<div><br>
<div>
<hr id="stopSpelling">Date: Tue, 10 Mar 2015 15:00:58 +0000<br>
From: <a class="moz-txt-link-abbreviated" href="mailto:seh@ebi.ac.uk">seh@ebi.ac.uk</a><br>
To: <a class="moz-txt-link-abbreviated" href="mailto:dev@ensembl.org">dev@ensembl.org</a><br>
Subject: Re: [ensembl-dev] How fetch a prediction matrix
using stable ID<br>
<br>
<br>
Hi Oriol,<br>
<br>
Polyphen (and Sift) results are heavily dependant on
sequence conservation estimates derived from protein
sequence alignments, so using different protein databases
can result in a substantial number of different calls. <br>
<br>
We used the latest protein databases available in November
2013, while the PolyPhen website uses databases from
December 2011/ January 2012, so we would expect to see some
differences.<br>
<br>
As you are no doubt aware, Polyphen provides two different
scores, HumVar and HumDiv. We supply HumVar as default while
the PolyPhen web site defaults to HumDiv. If you would like
to extract HumDiv results you can amend your script:<font
color="#555555" face="Luxi Sans, Helvetica, Arial, Geneva,
sans-serif"><span style="line-height:16px;"><br>
<br>
my $matrix_prediction= $matrix_adaptor->
fetch_polyphen_predictions_by_translation_md5($translation_md5,
'humdiv');</span></font><br>
<br>
Best wishes,<br>
<br>
Sarah<br>
<br>
<div class="ecxmoz-cite-prefix">On 10/03/2015 14:04, ori
wrote:<br>
</div>
<blockquote
cite="mid:DUB109-W4872C711645833D038CF9BB4180@phx.gbl">
<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}
.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}
--></style>
<div dir="ltr"><span
style="font-size:12.7272720336914px;color:rgb(85, 85,
85);font-family:'Luxi Sans', Helvetica, Arial, Geneva,
sans-serif;line-height:16px;">Hi, </span><br
style="color:rgb(34, 34, 34);font-family:arial,
sans-serif;font-size:small;">
<div style="color:rgb(34, 34, 34);font-family:arial,
sans-serif;font-size:small;"><span
style="color:rgb(85, 85, 85);font-family:'Luxi
Sans', Helvetica, Arial, Geneva,
sans-serif;font-size:12.7272720336914px;line-height:16px;">I
am trying to fetch the prediction matrix for some
proteins, and then some polyphen predictions for
some particular aminoacid changes. In Ensembl Help
Documentation of predicted data, it is found: "</span><span
style="font-size:12.7272720336914px;color:rgb(85,
85, 85);font-family:'Luxi Sans', Helvetica, Arial,
Geneva, sans-serif;line-height:16px;">Prediction
matrices can be fetched and manipulated in a
user-friendly manner using the variation API,
specifically using the </span><i
style="font-size:12.7272720336914px;color:rgb(85,
85, 85);font-family:'Luxi Sans', Helvetica, Arial,
Geneva, sans-serif;line-height:16px;">ProteinFunctionPredictionMatrixAdaptor</i><span
style="font-size:12.7272720336914px;color:rgb(85,
85, 85);font-family:'Luxi Sans', Helvetica, Arial,
Geneva, sans-serif;line-height:16px;"> which allows
you to fetch a prediction matrix using either a
transcript or a translation stable ID. This adaptor
returns a </span><i
style="font-size:12.7272720336914px;color:rgb(85,
85, 85);font-family:'Luxi Sans', Helvetica, Arial,
Geneva, sans-serif;line-height:16px;">ProteinFunctionPredictionMatrix</i><span
style="font-size:12.7272720336914px;color:rgb(85,
85, 85);font-family:'Luxi Sans', Helvetica, Arial,
Geneva, sans-serif;line-height:16px;"> object and
you can use the </span><i
style="font-size:12.7272720336914px;color:rgb(85,
85, 85);font-family:'Luxi Sans', Helvetica, Arial,
Geneva, sans-serif;line-height:16px;">get_prediction</i><span
style="font-size:12.7272720336914px;color:rgb(85,
85, 85);font-family:'Luxi Sans', Helvetica, Arial,
Geneva, sans-serif;line-height:16px;"> method to
retrieve a prediction for a given position and amino
acid". </span></div>
<div style="color:rgb(34, 34, 34);font-family:arial,
sans-serif;font-size:small;"><span
style="font-size:12.7272720336914px;color:rgb(85,
85, 85);font-family:'Luxi Sans', Helvetica, Arial,
Geneva, sans-serif;line-height:16px;"><br>
</span></div>
<div style="color:rgb(34, 34, 34);font-family:arial,
sans-serif;font-size:small;"><span
style="font-size:12.7272720336914px;color:rgb(85,
85, 85);font-family:'Luxi Sans', Helvetica, Arial,
Geneva, sans-serif;line-height:16px;">However, I am
not able to get my matrix using any type of ID. I
have been trying
fetch_polyphen_predictions_by_translation_md5 (using
Perl </span><font color="#555555" face="Luxi Sans,
Helvetica, Arial, Geneva, sans-serif"><span
style="line-height:16px;">Digest::MD5 to get
md5_hex), and it returns a matrix, but the
predictions doesn't match the real ones that
polyphen predicts for this change (I checked on
their website). </span></font></div>
<div style="color:rgb(34, 34, 34);font-family:arial,
sans-serif;font-size:small;"><font color="#555555"
face="Luxi Sans, Helvetica, Arial, Geneva,
sans-serif"><span style="line-height:16px;">I would
appreciate helps/tips to make things easier or to
point out where is my mistake. Here is so far what
I wrote: </span></font></div>
<div style="color:rgb(34, 34, 34);font-family:arial,
sans-serif;font-size:small;"><font color="#555555"
face="Luxi Sans, Helvetica, Arial, Geneva,
sans-serif"><span style="line-height:16px;">
<div><br>
</div>
<div>use warnings;</div>
<div>use Bio::EnsEMBL::Registry;</div>
<div>use Digest::MD5 qw(md5 md5_hex md5_base64);</div>
<div>use Bio::EnsEMBL::Utils::Exception qw(throw
warning);</div>
<div>use
Bio::EnsEMBL::Variation::ProteinFunctionPredictionMatrix;</div>
<div>print "Loading Registry...\n";</div>
<div>my $registry = "Bio::EnsEMBL::Registry";</div>
<div>$registry->load_registry_from_db( -host
=> 'ensembldb.ensembl.org', -user =>
'anonymous');</div>
<div>print "Correctly Loaded Registry\n";</div>
<div>my $transcript_adaptor = $registry ->
get_adaptor ('Human', 'Core', 'Transcript');</div>
<div>my $matrix_adaptor= $registry->
get_adaptor ('Human', 'variation',
'ProteinFunctionPredictionMatrixAdaptor');</div>
<div>my $transcript= $transcript_adaptor ->
fetch_by_stable_id('ENST00000367429');</div>
<div>my $translation_md5 =
md5_hex($transcript->translate->seq());</div>
<div>my $matrix_prediction= $matrix_adaptor->
fetch_polyphen_predictions_by_translation_md5($translation_md5);</div>
<div>my ($prediction) = $matrix_prediction
->get_prediction(1, V);</div>
<div>print "$prediction\n";</div>
<div><br>
</div>
<div>You will see that the outcome is benign, and
it should be probably damaging.</div>
<div><br>
</div>
<div>Thanks for the help, </div>
<div><br>
</div>
<div>Oriol</div>
</span></font></div>
</div>
<br>
<fieldset class="ecxmimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
Dev mailing list <a moz-do-not-send="true" class="ecxmoz-txt-link-abbreviated" href="mailto:Dev@ensembl.org">Dev@ensembl.org</a>
Posting guidelines and subscribe/unsubscribe info: <a moz-do-not-send="true" class="ecxmoz-txt-link-freetext" href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a>
Ensembl Blog: <a moz-do-not-send="true" class="ecxmoz-txt-link-freetext" href="http://www.ensembl.info/" target="_blank">http://www.ensembl.info/</a>
</pre>
</blockquote>
<br>
<br>
_______________________________________________
Dev mailing list <a class="moz-txt-link-abbreviated" href="mailto:Dev@ensembl.org">Dev@ensembl.org</a>
Posting guidelines and subscribe/unsubscribe info:
<a class="moz-txt-link-freetext" href="http://lists.ensembl.org/mailman/listinfo/dev">http://lists.ensembl.org/mailman/listinfo/dev</a>
Ensembl Blog: <a class="moz-txt-link-freetext" href="http://www.ensembl.info/">http://www.ensembl.info/</a></div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Dev mailing list <a class="moz-txt-link-abbreviated" href="mailto:Dev@ensembl.org">Dev@ensembl.org</a>
Posting guidelines and subscribe/unsubscribe info: <a class="moz-txt-link-freetext" href="http://lists.ensembl.org/mailman/listinfo/dev">http://lists.ensembl.org/mailman/listinfo/dev</a>
Ensembl Blog: <a class="moz-txt-link-freetext" href="http://www.ensembl.info/">http://www.ensembl.info/</a>
</pre>
</blockquote>
<br>
</body>
</html>