[ensembl-dev] Problem with Compara

Stephen Fitzgerald stephenf at ebi.ac.uk
Wed Dec 15 11:28:00 GMT 2010


Hi Daniel, you can use an eval statement in your script, something like :

#####
eval {
 	my @orthologies = 
@{$homology_adaptor->fetch_all_by_MethodLinkSpeciesSet($mlss_orth)};
};

if ($@) {
 	warn("$!");
} 
#####
Cheers, Stephen.


On Wed, 15 Dec 2010, Daniel Murphy wrote:

> Hi there,
>
> I have a slight problem with a script I've written to find orthologs for a
> list of mouse genes using the Ensembl Compara database. I have a large list
> of genes and whenever I run the script I get an error message at some point
> saying:
>
> Can't call method "isa" on an undefined value at
> /Network/.../Bio/EnsEMBL/Compara/DBSQL/HomologyAdaptor.pm
> line 185
>
> When I remove the offending gene id from the list I'll get the error again
> because of some other gene. This has happened to me before because of genes
> no longer being in a new version of EnsEMBL, in this case however the genes
> are in the latest EnsEMBL version but they aren't in the compara database,
> perhaps because some of them may be predicted. The problem is whenever the
> script comes across one of these genes the program exits instead of just
> ignoring the gene and going to the next one. Rather than going through my
> entire list of genes and manually removing any that aren't in the compara
> database I'd like to just be able to skip any of the genes that aren't
> found, so rather than the program exiting once it comes across a gene that
> isn't in the database I'd like it to just continue with the next gene.
> Is there any way to go about this? I appreciate any suggestions you might
> have.
>
> Regards,
>
> Daniel Murphy
>




More information about the Dev mailing list