Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl
Commits
a3d1ae68
Commit
a3d1ae68
authored
Nov 29, 2010
by
Andreas Kusalananda Kähäri
Browse files
*** empty log message ***
parent
999f150f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
8 deletions
+16
-8
misc-scripts/ontology/scripts/demo1.pl
misc-scripts/ontology/scripts/demo1.pl
+11
-2
misc-scripts/ontology/scripts/load_OBO_file.pl
misc-scripts/ontology/scripts/load_OBO_file.pl
+5
-6
No files found.
misc-scripts/ontology/scripts/demo1.pl
View file @
a3d1ae68
...
...
@@ -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:00
30326
';
my
$accession
=
'
GO:00
50825
';
# 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
);
...
...
misc-scripts/ontology/scripts/load_OBO_file.pl
View file @
a3d1ae68
...
...
@@ -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
'
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment