[ensembl-dev] Issues with phenotypeFeature

nconte nconte at ebi.ac.uk
Fri Feb 26 12:50:54 GMT 2016

I have an issue with phenotypeFeature fetch_all_by_Gene($gene) method. 
I am trying to retrieve phenotype from gene object and the script I have 
doesn't find any phenotype relating to this gene, whereas the ensembl 
website shows some  phenotype linked with gene

my starting point is a mouse gene from which i retrieve the human 
orthologue, and then query the phenotype related to this orthologue.
the script below should work and print no PHE for human LEP gene 
whereas there are phenotype linked to gene according to website
human Orthologue: LEP	ENSG00000174697	7	128241284	128257628	1
gene is    Lep	scalar  0
no PHE

any advise would be great - Also is it better to find phenotypes 
relating to variation of a gene rather than to the gene itself in order 
to get the full picture of phenotype related to a specific gene?

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

     -host=>  'ensembldb.ensembl.org', -user=>'anonymous',
     -port=>'3306', 'db_version' => 83,);
Bio::EnsEMBL::Registry->set_reconnect_when_lost(1);# will help with 
connection issues

my $gene_member_adaptor= Bio::EnsEMBL::Registry->get_adaptor("Multi", 
"compara", "GeneMember");
my $homology_adaptor = Bio::EnsEMBL::Registry->get_adaptor("Multi", 
"compara", "Homology");
my $pfh_adaptor = Bio::EnsEMBL::Registry->get_adaptor('human', 
'variation', 'phenotypefeature');

my $gene_member = 
#get the ensembl object correspoding to this mouse stable ID

			if ($gene_member){

#get orthologues in human
			my $all_homologies = 
$homology_adaptor->fetch_all_by_Member($gene_member, -TARGET_SPECIES => 
				if (!scalar(@{$all_homologies})){

				print   "no orthologue with ensembl orthology method\n";  ##1
			   	} # print a message if there is no corresponding mouse 
	#if there is/are orthologue(s) ,find them and print annotation about 
					foreach my $this_homology (@{$all_homologies}){
					my $homologue_genes = $this_homology->gene_list();
					my $homgene;
						foreach $homgene(@{$homologue_genes}){
						#get human orthologues only
							if (defined ($homgene->genome_db->name) &&  
$homgene->genome_db->name eq "homo_sapiens") {

							print  join("\t", "human Orthologue: 
"\n" ) ;



					my $gene = $gene_member->get_Gene();

					if ($gene){
					print 'gene is    '.$gene->external_name();
					my $pfs = $pfh_adaptor->fetch_all_by_Gene($gene);
					print "\t", 'scalar  '.scalar(@$pfs), "\n";
						if ( scalar(@$pfs)== 0 ){print "no PHE\n";}else{
						foreach my $pm(@{$pfs}){
							if ($pm){

							#fill with info about ensembl gene phenotype

							print "\t",$pm->source_name,"\t",$pm->phenotype->description, 
							}else {next;}

					} else{next;}

			}else {print 'no gene member',"\n"};


More information about the Dev mailing list