[ensembl-dev] Question regarding refseq transcript selector

Duarte Molha duartemolha at gmail.com
Mon Jul 10 09:29:36 BST 2017


Dear Devs.

In a discussion some time ago here in the forum (
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20170710/720583d5/attachment.html>


More information about the Dev mailing list