<div>Hi Gavin,</div><div><br>Instead of the following:<br><br><i><font class="Apple-style-span" face="'courier new', monospace">my @genearray = @{$gene_adaptor->list_stable_ids()};<br><br></font></i></div><div><i><font class="Apple-style-span" face="'courier new', monospace">...</font></i></div>
<div><i><font class="Apple-style-span" face="'courier new', monospace"><br># Foreach gene pull annotation</font></i></div><div><i><font class="Apple-style-span" face="'courier new', monospace"><br>foreach my $geneid (@genearray) {</font></i></div>
<div><i><br></i></div><div>You could perhaps try this?<br><br></div><div><font class="Apple-style-span" face="'courier new', monospace"><i>foreach my $geneid (@{$gene_adaptor->list_stable_ids}) {</i><br></font><br>
Cheers,<br><br>Steve<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
Hi,<br>
<br>
<br>
<br>
I have a relatively straightforward script I use for pulling gene<br>
annotation from the core database.<br>
<br>
<br>
<br>
The problem is it seems to have stopped working suddenly and I can't<br>
figure out why.<br>
<br>
<br>
<br>
The problem is occurring in the final line of this code.<br>
<br>
<br>
<br>
# Set up gene, transcript and go adaptors<br>
<br>
my $goadaptor = $registry->get_adaptor('Multi', 'Ontology', 'GOTerm');<br>
<br>
my $gene_adaptor = $registry->get_adaptor( 'Human', 'Core', 'Gene' );<br>
<br>
my $transcript_adaptor = $registry->get_adaptor('Human', 'Core',<br>
'Transcript');<br>
<br>
<br>
<br>
# Get list of all genes<br>
<br>
my @genearray = @{$gene_adaptor->list_stable_ids()};<br>
<br>
<br>
<br>
# Set up hash for storage of annotation<br>
<br>
my %hash=();<br>
<br>
<br>
<br>
# Foreach gene pull annotation<br>
<br>
<br>
<br>
foreach my $geneid (@genearray) {<br>
<br>
print "Pulling gene level annotation for $geneid...\n\n";<br>
<br>
        my $gene = $gene_adaptor->fetch_by_stable_id($geneid);<br>
<br>
<br>
<br>
        my $slicekaryo = $gene->slice->get_all_KaryotypeBands->[0];<br>
<br>
<br>
<br>
The output looks like this:<br>
<br>
<br>
<br>
Pulling gene level annotation for ENSG00000000003... (executes ok)<br>
<br>
<br>
<br>
Pulling gene level annotation for TSPAN6-002...<br>
<br>
<br>
<br>
TSPAN6-002<br>
<br>
Can't call method "slice" on an undefined value at<br>
./GeneTransProtRework.pl line 113.<br>
<br>
<br>
<br>
<br>
<br>
I can't understand why it suddenly stopped working.  I recently updated<br>
my databases to v60.  Is it possible this had something to do with it?<br>
<br>
<br>
<br>
<br>
<br>
Gavin Oliver, MSc<br>
<br>
Team Leader Genomic Research<br>
<br>
Almac<br>
<br>
Diagnostics<br>
<br>
Tel: +44 (0)28 38395792<br>
<br>
Fax: +44 (0)28 38398676<br>
<br>
Visit our website at: <a href="http://www.almacgroup.com" target="_blank">http://www.almacgroup.com</a><br>
<<a href="http://www.almacgroup.com/" target="_blank">http://www.almacgroup.com/</a>><br>
<br>
<br>
<br>
<br>
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.<br>

<br>
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.<br>

<br>
Almac Sciences (Scotland) Limited, registered in Scotland no. SC154034.<br>
<br>
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: <a href="http://www.almacgroup.com" target="_blank">www.almacgroup.com</a><br>
</blockquote></div><br>-- <br>Kindest regards,<br><br>Steve Moss<br><a href="http://stevemoss.ath.cx" target="_blank">http://stevemoss.ath.cx</a><br>
</div>