[ensembl-dev] looking up GENSCAN transcripts?

Janet Young jayoung at fhcrc.org
Fri Sep 30 22:07:26 BST 2011


Hi there,

I could use a little help on the perl API, I'm afraid.

I've been using the perl API to pull out exon coordinates for transcripts from various species.   I can make it work fine for transcripts in the 'cdna' set (e.g. ENSCAFT00000018598) but I can't make it work for ab initio transcripts (e.g. GENSCAN00000055763).  I pulled out some ab initio transcript IDs I'm interested in by downloading the full set and blasting with some genes I'm interested in.

I'm know my problem is probably one of the following:
	wrong adaptor group
	wrong adaptor type
	wrong method (do I have a stable ID or some other kind of ID?)
But I'm not sure which one, and I'm not sure how to proceed to figure it out.

The script I was trying is shown below.  Any suggestions appreciated.

thanks very much,

Janet Young 

Fred Hutchinson Cancer Research Center



####################

#!/usr/bin/perl

use warnings;
use strict;
use Bio::EnsEMBL::Registry;

my $registry = 'Bio::EnsEMBL::Registry';
$registry->load_registry_from_db(
  -host => 'ensembldb.ensembl.org',
  -user => 'anonymous'
);

my $txId1 = "ENSCAFT00000018598";
my $txId2 = "GENSCAN00000055763";

### this works
my $tx_adaptor1 = $registry->get_adaptor('canis_familiaris', 'Core', 'Transcript');
my $transcript1 = $tx_adaptor1->fetch_by_stable_id($txId1) || die "couldn't find transcript for $txId1\n";
my $start1 = $transcript1->start();
print "start1 $start1\n";

### this doesn't
my $tx_adaptor2 = $registry->get_adaptor('canis_familiaris', 'Core', 'Transcript');
my $transcript2 = $tx_adaptor2->fetch_by_stable_id($txId2) || print "couldn't find transcript for $txId2 using adapt2\n";

### nor this
my $tx_adaptor3 = $registry->get_adaptor('canis_familiaris', 'otherfeatures', 'Transcript');
my $transcript3 = $tx_adaptor3->fetch_by_stable_id($txId2) || print "couldn't find transcript for $txId2 using adapt3\n";






More information about the Dev mailing list