[ensembl-dev] [SPAM] - Re: Problem with core script - Email found in subject
Oliver, Gavin
gavin.oliver at almacgroup.com
Wed Nov 24 15:41:03 GMT 2010
Oh god.
I hang my head in shame.
Maybe I did change this script after all.
2nd use of the name genearray.
Schoolboy error.
-----Original Message-----
From: Andreas Kahari [mailto:ak at ebi.ac.uk]
Sent: 24 November 2010 15:29
To: Oliver, Gavin
Cc: dev
Subject: [SPAM] - Re: [ensembl-dev] Problem with core script - Email found in subject
On Wed, Nov 24, 2010 at 02:38:59PM -0000, Oliver, Gavin wrote:
> I should point out that if I print the array of gene IDs, the second
> gene is ENSG00000000005 so I don't know where the TSPAN id is coming
> from!
The code that you posted has a foreach loop that is not closed properly,
so I assume that you have omitted some code from the end of it. Does
that code by any chance write things into the @genearray list that
you're iterating over?
If so, please consider using another list for that data as looping over
a changing list messes with my head.
Cheers,
Andreas
>
>
>
> ________________________________
>
> From: dev-bounces at ensembl.org [mailto:dev-bounces at ensembl.org] On Behalf
> Of Oliver, Gavin
> Sent: 24 November 2010 14:25
> To: dev
> Subject: [ensembl-dev] Problem with core script
>
>
>
> 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.
>
>
>
> # Set up gene, transcript and go adaptors
>
> my $goadaptor = $registry->get_adaptor('Multi', 'Ontology', 'GOTerm');
>
> my $gene_adaptor = $registry->get_adaptor( 'Human', 'Core', 'Gene' );
>
> my $transcript_adaptor = $registry->get_adaptor('Human', 'Core',
> 'Transcript');
>
>
>
> # Get list of all genes
>
> my @genearray = @{$gene_adaptor->list_stable_ids()};
>
>
>
> # Set up hash for storage of annotation
>
> my %hash=();
>
>
>
> # 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...
>
>
>
> TSPAN6-002
>
> Can't call method "slice" on an undefined value at
> ./GeneTransProtRework.pl line 113.
>
>
>
>
>
> 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?
>
>
>
>
>
> 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
Kingdom
More information about the Dev
mailing list