[ensembl-dev] Problem with core script

Andreas Kahari ak at ebi.ac.uk
Wed Nov 24 15:09:42 GMT 2010


See below.

On Wed, Nov 24, 2010 at 02:25:24PM -0000, Oliver, Gavin wrote:
> Hi, 
> 
>  
> 
> I have a relatively straightforward script I use for pulling gene
> annotation from the core database.
> 
> The problem is it seems to have stopped working suddenly and I can't
> figure out why.
> 
> The problem is occurring in the final line of this code.  
> 

I've trimmed the code down a bit to the essentials (removeing the unused
GOTerm adaptor and the unused transcript adaptor, and the hash).

# Set up gene, transcript and go adaptors
my $gene_adaptor = $registry->get_adaptor( 'Human', 'Core', 'Gene' );

# Get list of all genes
my @genearray = @{ $gene_adaptor->list_stable_ids() };

# Foreach gene pull annotation
foreach my $geneid (@genearray) {
  print "Pulling gene level annotation for $geneid...\n\n";

  my $gene       = $gene_adaptor->fetch_by_stable_id($geneid);
  my $slicekaryo = $gene->slice->get_all_KaryotypeBands->[0];
}


> The output looks like this:
> 
> Pulling gene level annotation for ENSG00000000003... (executes ok)
> Pulling gene level annotation for TSPAN6-002...

Hmm... Why would you suddenly get the display label of one of the
transcripts of gene ENSG00000000003 in @genearray?  There seems to be
some code missing.  The code above works for me on release 60.

> 
>  
> 
> TSPAN6-002
> 
> Can't call method "slice" on an undefined value at
> ./GeneTransProtRework.pl line 113.

No, because you failed to get the gene that has the stable ID
"TSPAN6-002" (there is no such Ensembl gene stable ID).

> I can't understand why it suddenly stopped working.  I recently updated
> my databases to v60.  Is it possible this had something to do with it?

I think there's code you're omitting to show us.


Cheers,
Andreas

> 
> Gavin Oliver, MSc
> 
> Team Leader Genomic Research
> 
> Almac
> 
> Diagnostics
> 
> Tel: +44 (0)28 38395792
> 
> Fax: +44 (0)28 38398676
> 
> Visit our website at: http://www.almacgroup.com
> <http://www.almacgroup.com/> 
> 
>  
> 
> 
> The contents of this message and any attachments to it are confidential and may be legally privileged. If you have received this message in error, you should delete it from your system immediately and advise the sender.
> 
> Almac Group (UK) Limited, registered no. NI061368.  Almac Sciences Limited, registered no. NI041550.  Almac Discovery Limited, registered no. NI046249.  Almac Pharma Services Limited, registered no. NI045055.  Almac Clinical Services Limited, registered no. NI041905.  Almac Clinical Technologies Limited, registered no. NI061202.  Almac Diagnostics Limited, registered no. NI043067.  All preceding companies are registered in Northern Ireland with a registered office address of Almac House, 20 Seagoe Industrial Estate, Craigavon, BT63 5QD, UK.  
> 
> Almac Sciences (Scotland) Limited, registered in Scotland no. SC154034. 
> 
> Almac Clinical Services LLC, Almac Clinical Technologies LLC, Almac Diagnostics LLC, Almac Pharma Services LLC and Almac Sciences LLC are Delaware limited liability companies and Almac Group Incorporated is a Delaware Corporation.  More information on the Almac Group can be found on the Almac website: www.almacgroup.com
> 
> 

> _______________________________________________
> Dev mailing list
> Dev at ensembl.org
> http://lists.ensembl.org/mailman/listinfo/dev


-- 
Andreas Kähäri, Ensembl Software Developer
European Bioinformatics Institute (EMBL-EBI)
Wellcome Trust Genome Campus
Hinxton, Cambridge CB10 1SD, United Kingdom




More information about the Dev mailing list