[ensembl-dev] Question regarding refseq transcript selector

Thibaut Hourlier thibaut at ebi.ac.uk
Wed Jul 12 10:42:42 BST 2017


Hi Duarte,
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, http://www.ensembl.org/info/docs/Doxygen/core-api/classBio_1_1EnsEMBL_1_1Utils_1_1Exception.html#a5922a2cd079435ef926dc37f7c5ee70e, and you won’t be bother with this warning anymore.

Thanks
Thibaut

> On 12 Jul 2017, at 10:02, Duarte Molha <duartemolha at gmail.com> wrote:
> 
> 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.
> 
> Many thanks
> 
> Duarte
> 
>  
> 
> Duarte Molha
> about.me/duarte
> 
>  <https://about.me/duarte?promo=email_sig> 				
> 
> 
> On 11 July 2017 at 10:14, Kieron Taylor <ktaylor at ebi.ac.uk <mailto:ktaylor at ebi.ac.uk>> wrote:
> Hi Duarte,
> 
> 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.
> 
> 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.
> 
> You can learn more about CCDS here: http://www.ensembl.org/info/genome/genebuild/ccds.html <http://www.ensembl.org/info/genome/genebuild/ccds.html>
> We use CCDS data to populate a core-like database and then create a DBAdaptor which used by the TranscriptSelector.
> 
> I hope that covers the salient points.
> 
> Kieron
> 
> 
> 
> Kieron Taylor PhD.
> Ensembl Developer
> 
> EMBL, European Bioinformatics Institute
> 
> 
> 
> 
> 
> 
> > On 10 Jul 2017, at 09:29, Duarte Molha <duartemolha at gmail.com <mailto:duartemolha at gmail.com>> wrote:
> >
> > Dear Devs.
> >
> > In a discussion some time ago here in the forum ( http://lists.ensembl.org/pipermail/dev/2016-July/012031.html <http://lists.ensembl.org/pipermail/dev/2016-July/012031.html> ) 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:
> >
> > my $selector = Bio::EnsEMBL::Utils::TranscriptSelector->new();
> > # get a gene from somewhere and modify to remove the XMs
> > my $canonical_transcript = $selector->select_canonical_transcript_for_Gene($gene);
> >
> > I followed his advise and integrated it into my code as follows:
> > my $mod_gene = $gene;
> > my $selector = Bio::EnsEMBL::Utils::TranscriptSelector->new();
> > foreach my $transcript (@{$mod_gene->get_all_Transcripts()}){
> >       if ($options->{query} =~ /refseq/ && $transcript->stable_id() !~ /^NM_/){
> >               $mod_gene->remove_Transcript($transcript);
> >       }
> > }
> > my $canonical_transcript = $selector->select_canonical_transcript_for_Gene($mod_gene);
> > $mod_gene->canonical_transcript($canonical_transcript);
> >
> > $gene=$mod_gene;
> >
> >
> > This seems to do the job, however my script keeps issuing warnings
> >
> > -------------------- WARNING ----------------------
> > MSG: Running without CCDS DB
> > FILE: EnsEMBL/Utils/TranscriptSelector.pm LINE: 80
> > CALLED BY: getFeatures.pl  LINE: 985
> > Date (localtime)    = Fri Jul  7 17:32:54 2017
> > Ensembl API version = 83
> >
> > ---------------------------------------------------
> >
> > I believe the problem is that I am not providing a CCDS DB on the line
> > my $selector = Bio::EnsEMBL::Utils::TranscriptSelector->new();
> > I read the documentation and that seems to be an optional parameter.
> >
> > 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?
> >
> > Many thanks
> >
> > Duarte
> > _______________________________________________
> > Dev mailing list    Dev at ensembl.org <mailto:Dev at ensembl.org>
> > Posting guidelines and subscribe/unsubscribe info: http://lists.ensembl.org/mailman/listinfo/dev <http://lists.ensembl.org/mailman/listinfo/dev>
> > Ensembl Blog: http://www.ensembl.info/ <http://www.ensembl.info/>
> 
> _______________________________________________
> Dev mailing list    Dev at ensembl.org <mailto:Dev at ensembl.org>
> Posting guidelines and subscribe/unsubscribe info: http://lists.ensembl.org/mailman/listinfo/dev <http://lists.ensembl.org/mailman/listinfo/dev>
> Ensembl Blog: http://www.ensembl.info/ <http://www.ensembl.info/>
> 
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info: http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20170712/e6a310a4/attachment.html>


More information about the Dev mailing list