Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
ensembl
Commits
623b61b2
Commit
623b61b2
authored
21 years ago
by
Graham McVicker
Browse files
Options
Downloads
Patches
Plain Diff
added more/updated tests for go_xrefs
parent
80388edc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/t/dbEntries.t
+43
-4
43 additions, 4 deletions
modules/t/dbEntries.t
with
43 additions
and
4 deletions
modules/t/dbEntries.t
+
43
−
4
View file @
623b61b2
...
@@ -4,7 +4,7 @@ use warnings;
...
@@ -4,7 +4,7 @@ use warnings;
BEGIN
{
$|
=
1
;
BEGIN
{
$|
=
1
;
use
Test
;
use
Test
;
plan
tests
=>
9
;
plan
tests
=>
12
;
}
}
use
MultiTestDB
;
use
MultiTestDB
;
...
@@ -50,7 +50,7 @@ $sth->finish();
...
@@ -50,7 +50,7 @@ $sth->finish();
my
$ga
=
$db
->
get_GeneAdaptor
();
my
$ga
=
$db
->
get_GeneAdaptor
();
my
$all_gene_ids
=
$ga
->
list_
geneId
s
();
my
$all_gene_ids
=
$ga
->
list_
dbID
s
();
for
my
$gene_id
(
@$all_gene_ids
)
{
for
my
$gene_id
(
@$all_gene_ids
)
{
my
$gene
=
$ga
->
fetch_by_dbID
(
$gene_id
);
my
$gene
=
$ga
->
fetch_by_dbID
(
$gene_id
);
...
@@ -99,7 +99,7 @@ my $goref = Bio::EnsEMBL::GoXref->new
...
@@ -99,7 +99,7 @@ my $goref = Bio::EnsEMBL::GoXref->new
-
release
=>
"
1
",
-
release
=>
"
1
",
-
display_id
=>
"
Ens related GO
"
-
display_id
=>
"
Ens related GO
"
);
);
$goref
->
linkage_type
(
"
experimental
"
);
$goref
->
add_
linkage_type
(
"
IC
"
);
my
$ident_xref
=
Bio::EnsEMBL::
IdentityXref
->
new
my
$ident_xref
=
Bio::EnsEMBL::
IdentityXref
->
new
(
(
...
@@ -183,9 +183,48 @@ debug( "Number of identity_xrefs = $ident_count" );
...
@@ -183,9 +183,48 @@ debug( "Number of identity_xrefs = $ident_count" );
ok
(
$ident_count
==
2
);
ok
(
$ident_count
==
2
);
$multi
->
restore
();
#
# 10-12 Test that external synonyms and go evidence tags are retrieved
#
my
$ta
=
$db
->
get_TranscriptAdaptor
();
my
$translation
=
$ta
->
fetch_by_dbID
(
21737
)
->
translation
;
#pull out an xref that should 2 external synonyms
my
$xrefs
=
$dbEntryAdaptor
->
fetch_all_by_Translation
(
$translation
);
(
$xref
)
=
grep
{
$_
->
dbID
==
315
}
@$xrefs
;
my
@syns
=
grep
{
$_
eq
'
syn1
'
||
$_
eq
'
syn2
'}
@
{
$xref
->
get_all_synonyms
};
ok
(
@syns
==
2
);
#and also 2 evidence tags
if
(
$xref
&&
$xref
->
isa
('
Bio::EnsEMBL::GoXref
'))
{
my
@evtags
=
grep
{
$_
eq
'
IEA
'
||
$_
eq
'
IC
'}
@
{
$xref
->
get_all_linkage_types
()};
ok
(
@evtags
==
2
);
}
else
{
ok
(
0
);
}
$translation
=
$ta
->
fetch_by_dbID
(
21723
)
->
translation
;
$xrefs
=
$dbEntryAdaptor
->
fetch_all_by_Translation
(
$translation
);
(
$xref
)
=
grep
{
$_
->
dbID
==
257
}
@$xrefs
;
if
(
$xref
&&
$xref
->
isa
('
Bio::EnsEMBL::GoXref
'))
{
my
(
$evtag
)
=
@
{
$xref
->
get_all_linkage_types
()};
ok
(
$evtag
eq
'
IC
');
}
else
{
ok
(
0
);
}
#
#
# Need more tests here ...
# Need more tests here ...
#
#
$multi
->
restore
();
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment