[ensembl-dev] Error when retrieve transcript data

Grace Cheng himwo at yahoo.com.hk
Wed Jul 13 11:10:14 BST 2011


Hi everyone,
 
I have locally installed the ensembl database and using the ensembl api v60. However, when I tried to retrieve information from a transcript, I get the following error message:
 
 -------------------- EXCEPTION --------------------
MSG: Could not find start or end exon in transcript_id=510612
STACK Bio::EnsEMBL::DBSQL::TranslationAdaptor::fetch_by_Transcript /home/GraceCheng/src/ensembl.60/modules/Bio/EnsEMBL/DBSQL/TranslationAdaptor.pm:256
STACK Bio::EnsEMBL::Transcript::translation /home/GraceCheng/src/ensembl.60/modules/Bio/EnsEMBL/Transcript.pm:621
STACK Bio::EnsEMBL::Transcript::cdna_coding_start /home/GraceCheng/src/ensembl.60/modules/Bio/EnsEMBL/Transcript.pm:844
STACK toplevel ensembl_transcript.pl:74
Ensembl API version = 60
---------------------------------------------------

I have no idea what is going on, could anyone help? Below is my script:
 
my $dba = Bio::EnsEMBL::DBSQL::DBAdaptor->new(
           -dbname => $opt{dbname},
           -user => $opt{dbuser},
           -pass => $opt{dbpass},
           -host => $opt{dbhost},
           -port => $opt{dbport},
          );
 
my $tr_adaptor = $dba->get_TranscriptAdaptor;
my $tl_adaptor = $dba->get_TranslationAdaptor; 
my $DIR = "/home/GraceCheng/perl_scripts/ensembl_api";
my $infile = "$DIR/transcriptID_uniq.txt";
my $outfile = "./transcript_info.out";
open (INFILE, "<$infile") || die ("Could not open infile $infile\n");
open(OUT, "> $outfile") || die ("Could not open outfile $outfile\n");
while( my $in_line = <INFILE> ) {
 chomp ($in_line);
 next if ($.==1);
 my @inline = split (/\t/, $in_line);
   
 my $trID = $inline[1];
 my $genename = $inline[0];
 
 my $tr = $tr_adaptor->fetch_by_stable_id($trID);
 
 if ($tr) {
  my $trname = $tr->external_name();
  my $start = $tr->start();
  my $end = $tr->end();
  my $chr = $tr->slice->seq_region_name();
  my $cdna_coding_start = $tr->cdna_coding_start();
  my $cdna_coding_end = $tr->cdna_coding_end();
  
  print OUT "$in_line\t";
  print OUT "chr$chr\:$start-$end\t$trname\t$cdna_coding_start\t$cdna_coding_end\n";
 }
}
close (INFILE);
close (OUT);
 
Many thanks!
 
Grace
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20110713/9ff85721/attachment.html>


More information about the Dev mailing list