Commit a3d1ae68 authored by Andreas Kusalananda Kähäri's avatar Andreas Kusalananda Kähäri
Browse files

*** empty log message ***

parent 999f150f
......@@ -16,16 +16,25 @@ use Bio::EnsEMBL::Registry;
my $registry = 'Bio::EnsEMBL::Registry';
<<<<<<< demo1.pl
$registry->load_registry_from_db(
'-host' => 'ens-staging',
'-user' => 'ensro',
'-db_version' => 56,
'-verbose' => 1,
);
=======
$registry->load_registry_from_db( '-host' => 'ensembldb.ensembl.org',
'-user' => 'anonymous' );
>>>>>>> 1.4
my $accession = 'GO:0030326';
my $accession = 'GO:0050825';
# Get a GO term adaptor and a gene adaptor (for human).
my $go_adaptor =
$registry->get_adaptor( 'Multi', 'Ontology', 'GOTerm' );
my $gene_adaptor = $registry->get_adaptor( 'Human', 'Core', 'Gene' );
my $gene_adaptor = $registry->get_adaptor( 'Mouse', 'Core', 'Gene' );
# Fetch a GO term by its accession.
my $term = $go_adaptor->fetch_by_accession($accession);
......
......@@ -431,12 +431,11 @@ EOT
my $type = $1;
my $data = $2;
if ( $type eq 'id' ) { $term{'accession'} = $data }
elsif ( $type eq 'name' ) { $term{'name'} = $data }
elsif ( $type eq 'namespace' ) { $term{'namespace'} = $data }
elsif ( $type eq 'def' ) {
( $term{'definition'} ) = $data =~ /"([^"]+)"/;
} elsif ( $type eq 'is_a' ) {
if ( $type eq 'id' ) { $term{'accession'} = $data }
elsif ( $type eq 'name' ) { $term{'name'} = $data }
elsif ( $type eq 'namespace' ) { $term{'namespace'} = $data }
elsif ( $type eq 'def' ) { $term{'definition'} = $data }
elsif ( $type eq 'is_a' ) {
my ($parent_acc) = $data =~ /(\S+)/;
push( @{ $term{'parents'}{'is_a'} }, $parent_acc );
} elsif ( $type eq 'relationship' ) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment