<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Duarte,<div class="">CCDS are optional so you don’t need them if you just want to avoid XMs. To remove the the warning message you just need to use “verbose(‘EXCEPTION’);” in your code, <a href="http://www.ensembl.org/info/docs/Doxygen/core-api/classBio_1_1EnsEMBL_1_1Utils_1_1Exception.html#a5922a2cd079435ef926dc37f7c5ee70e" class="">http://www.ensembl.org/info/docs/Doxygen/core-api/classBio_1_1EnsEMBL_1_1Utils_1_1Exception.html#a5922a2cd079435ef926dc37f7c5ee70e</a>, and you won’t be bother with this warning anymore.</div><div class=""><br class=""></div><div class="">Thanks</div><div class="">Thibaut</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 12 Jul 2017, at 10:02, Duarte Molha <<a href="mailto:duartemolha@gmail.com" class="">duartemolha@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">I understand your point about the CCDS. But for my purposes I am not trying to reannotate genes.. I just want to ignore some of the transcripts you have selected for that particular gene (XM_ transcripts) and then select the canonical transcript based on the remaining ones.<div class=""><br class=""></div><div class="">Many thanks</div><div class=""><br class=""></div><div class="">Duarte</div></div><div class="gmail_extra"><br clear="all" class=""><div class=""><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><table border="0" cellpadding="0" cellspacing="0" style="margin:0px;padding:0px;border:0px;outline:0px;font-size:14px;font-family:proxima-nova-1,proxima-nova-2,Tahoma,Helvetica,Verdana,sans-serif;vertical-align:baseline;border-spacing:0px;color:rgb(51,51,51);line-height:18.2000007629395px" class=""><tbody style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline" class=""><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline" class=""><td style="padding:0px;border:0px;outline:0px;font-style:inherit;font-size:0px;font-family:inherit;vertical-align:baseline;width:auto;height:30px" class=""> </td></tr><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline" class=""><td style="padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:baseline;width:auto" class=""><div style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;line-height:0" class=""><a href="https://about.me/duarte?promo=email_sig" style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;color:rgb(43,130,173);text-decoration:none;display:inline-block" target="_blank" class=""><table border="0" cellpadding="0" cellspacing="0" style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;border-spacing:0px" class=""><tbody style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline" class=""><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline" class=""><td align="left" valign="top" style="padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:top;width:auto;line-height:1" class=""><img alt="--" width="0" height="0" style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;display:block;width:0px;height:0px;overflow:hidden" class=""><div style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:bold;font-style:inherit;font-size:18px;font-family:proxima-nova-1,Proxima-Nova,Helvetica,Arial,sans-serif;vertical-align:baseline;line-height:1;color:rgb(51,51,51)" class="">Duarte Molha</div><div style="margin:3px 0px 0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-size:12px;font-family:proxima-nova-1,Proxima-Nova,Helvetica,Arial,sans-serif;vertical-align:baseline" class=""><img alt="https://" width="0" height="0" style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;display:block;width:0px;height:0px;overflow:hidden" class="">about.me/duarte</div></td></tr><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline" class=""><td align="left" valign="top" style="padding:8px 0px 0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:top;width:auto;line-height:1" class=""><div style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;text-align:right;height:4px;background-color:rgb(197,208,224)" class=""><img src="https://d13pix9kaak6wt.cloudfront.net/signature/colorbar.png" alt="" width="88" height="4" style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;float:right;display:block" class=""></div></td></tr></tbody></table></a>                           </div></td></tr><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline" class=""><td style="padding:0px;border:0px;outline:0px;font-style:inherit;font-size:0px;font-family:inherit;vertical-align:baseline;width:auto;height:20px" class=""><img src="https://about.me/t/sig?u=duarte" width="1" height="1" style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;overflow:hidden" class=""></td></tr></tbody></table></div></div></div></div>
<br class=""><div class="gmail_quote">On 11 July 2017 at 10:14, Kieron Taylor <span dir="ltr" class=""><<a href="mailto:ktaylor@ebi.ac.uk" target="_blank" class="">ktaylor@ebi.ac.uk</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Duarte,<br class="">
<br class="">
CCDS data is a big part of how Ensembl currently chooses its canonical transcripts, in that we want our decisions to reflect the consensus of several resources. It is not essential to the process and you will still get reasonable decisions without it, but they might differ from what Ensembl publishes.<br class="">
<br class="">
You can reduce the amount of warnings by only instantiating TranscriptSelector once, as opposed to for every feature or set of features. Then you get one warning at setup. If you really demand quiet output, then you always delete line 81 from TranscriptSelector. There should be no consequences for you doing this.<br class="">
<br class="">
You can learn more about CCDS here: <a href="http://www.ensembl.org/info/genome/genebuild/ccds.html" rel="noreferrer" target="_blank" class="">http://www.ensembl.org/info/<wbr class="">genome/genebuild/ccds.html</a><br class="">
We use CCDS data to populate a core-like database and then create a DBAdaptor which used by the TranscriptSelector.<br class="">
<br class="">
I hope that covers the salient points.<br class="">
<br class="">
Kieron<br class="">
<br class="">
<br class="">
<br class="">
Kieron Taylor PhD.<br class="">
Ensembl Developer<br class="">
<br class="">
EMBL, European Bioinformatics Institute<br class="">
<div class=""><div class="h5"><br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
> On 10 Jul 2017, at 09:29, Duarte Molha <<a href="mailto:duartemolha@gmail.com" class="">duartemolha@gmail.com</a>> wrote:<br class="">
><br class="">
> Dear Devs.<br class="">
><br class="">
> In a discussion some time ago here in the forum ( <a href="http://lists.ensembl.org/pipermail/dev/2016-July/012031.html" rel="noreferrer" target="_blank" class="">http://lists.ensembl.org/<wbr class="">pipermail/dev/2016-July/<wbr class="">012031.html</a> ) regarding how I could make use of Ensembl logical canonical programming to modify a refseq gene to remove XM_ transcripts and for the selection of canonical transcripts of only NM_ transcripts,  Andy suggested that I could use something like this:<br class="">
><br class="">
> my $selector = Bio::EnsEMBL::Utils::<wbr class="">TranscriptSelector->new();<br class="">
> # get a gene from somewhere and modify to remove the XMs<br class="">
> my $canonical_transcript = $selector->select_canonical_<wbr class="">transcript_for_Gene($gene);<br class="">
><br class="">
> I followed his advise and integrated it into my code as follows:<br class="">
> my $mod_gene = $gene;<br class="">
> my $selector = Bio::EnsEMBL::Utils::<wbr class="">TranscriptSelector->new();<br class="">
> foreach my $transcript (@{$mod_gene->get_all_<wbr class="">Transcripts()}){<br class="">
>       if ($options->{query} =~ /refseq/ && $transcript->stable_id() !~ /^NM_/){<br class="">
>               $mod_gene->remove_Transcript($<wbr class="">transcript);<br class="">
>       }<br class="">
> }<br class="">
> my $canonical_transcript = $selector->select_canonical_<wbr class="">transcript_for_Gene($mod_gene)<wbr class="">;<br class="">
> $mod_gene->canonical_<wbr class="">transcript($canonical_<wbr class="">transcript);<br class="">
><br class="">
> $gene=$mod_gene;<br class="">
><br class="">
><br class="">
> This seems to do the job, however my script keeps issuing warnings<br class="">
><br class="">
> -------------------- WARNING ----------------------<br class="">
> MSG: Running without CCDS DB<br class="">
> FILE: EnsEMBL/Utils/<wbr class="">TranscriptSelector.pm LINE: 80<br class="">
> CALLED BY: getFeatures.pl  LINE: 985<br class="">
> Date (localtime)    = Fri Jul  7 17:32:54 2017<br class="">
> Ensembl API version = 83<br class="">
><br class="">
> ------------------------------<wbr class="">---------------------<br class="">
><br class="">
> I believe the problem is that I am not providing a CCDS DB on the line<br class="">
> my $selector = Bio::EnsEMBL::Utils::<wbr class="">TranscriptSelector->new();<br class="">
> I read the documentation and that seems to be an optional parameter.<br class="">
><br class="">
> Can you tell me if this is a problem and if it is how I can set the CCDS DB and if not how I can stop these warnings being issued?<br class="">
><br class="">
> Many thanks<br class="">
><br class="">
> Duarte<br class="">
</div></div>> ______________________________<wbr class="">_________________<br class="">
> Dev mailing list    <a href="mailto:Dev@ensembl.org" class="">Dev@ensembl.org</a><br class="">
> Posting guidelines and subscribe/unsubscribe info: <a href="http://lists.ensembl.org/mailman/listinfo/dev" rel="noreferrer" target="_blank" class="">http://lists.ensembl.org/<wbr class="">mailman/listinfo/dev</a><br class="">
> Ensembl Blog: <a href="http://www.ensembl.info/" rel="noreferrer" target="_blank" class="">http://www.ensembl.info/</a><br class="">
<br class="">
______________________________<wbr class="">_________________<br class="">
Dev mailing list    <a href="mailto:Dev@ensembl.org" class="">Dev@ensembl.org</a><br class="">
Posting guidelines and subscribe/unsubscribe info: <a href="http://lists.ensembl.org/mailman/listinfo/dev" rel="noreferrer" target="_blank" class="">http://lists.ensembl.org/<wbr class="">mailman/listinfo/dev</a><br class="">
Ensembl Blog: <a href="http://www.ensembl.info/" rel="noreferrer" target="_blank" class="">http://www.ensembl.info/</a><br class="">
</blockquote></div><br class=""></div>
_______________________________________________<br class="">Dev mailing list    <a href="mailto:Dev@ensembl.org" class="">Dev@ensembl.org</a><br class="">Posting guidelines and subscribe/unsubscribe info: <a href="http://lists.ensembl.org/mailman/listinfo/dev" class="">http://lists.ensembl.org/mailman/listinfo/dev</a><br class="">Ensembl Blog: <a href="http://www.ensembl.info/" class="">http://www.ensembl.info/</a><br class=""></div></blockquote></div><br class=""></div></body></html>