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
1daa1afd
Commit
1daa1afd
authored
11 years ago
by
Alessandro Vullo
Browse files
Options
Downloads
Patches
Plain Diff
Removed other unnecessary dependencies.
parent
3c3d165f
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/sequenceOntologyMapper.t
+4
-7
4 additions, 7 deletions
modules/t/sequenceOntologyMapper.t
with
4 additions
and
7 deletions
modules/t/sequenceOntologyMapper.t
+
4
−
7
View file @
1daa1afd
...
...
@@ -8,12 +8,9 @@
use
strict
;
use
warnings
;
use
Data::
Dumper
;
use
Test::
More
;
use
Test::
Exception
;
use
Bio::EnsEMBL::
Registry
;
use
Bio::EnsEMBL::Utils::
Scalar
qw (
assert_ref
);
use
Bio::EnsEMBL::Test::
MultiTestDB
;
use
Bio::EnsEMBL::Utils::
SequenceOntologyMapper
;
...
...
@@ -55,7 +52,7 @@ my $mappings =
# test generic feature
{
obj
=>
Bio::EnsEMBL::
Feature
->
new
(),
accession
=>
'
SO:0000001
',
name
=>
'
region
'
},
# test various genes with/without biotypes
{
obj
=>
Bio::EnsEMBL::
Gene
->
new
(),
accession
=>
'
SO:0000704
',
name
=>
'
gene
'
},
{
obj
=>
Bio::EnsEMBL::
Gene
->
new
(
-
biotype
=>
'
dummy
'
),
accession
=>
'
SO:0000704
',
name
=>
'
gene
'
},
# if we don't pass a non empty biotype it will default to protein_coding hence it will fail
{
obj
=>
Bio::EnsEMBL::
Gene
->
new
(
-
biotype
=>
'
protein_coding
'),
accession
=>
'
SO:0001217
',
name
=>
'
protein_coding_gene
'
},
{
obj
=>
Bio::EnsEMBL::
Gene
->
new
(
-
biotype
=>
'
tRNA
'),
accession
=>
'
SO:0001272
',
name
=>
'
tRNA_gene
'
},
# test various transcripts with/without biotypes
...
...
@@ -74,12 +71,12 @@ my $mappings =
{
obj
=>
Bio::EnsEMBL::
RepeatFeature
->
new
(),
accession
=>
'
SO:0000657
',
name
=>
'
repeat_region
'
},
];
throws_ok
{
$mapper
->
t
ranslate
(
bless
({},
'
Someclass
'))
}
qr /not
found
/
,
"
t
ranslate method
raises exception
";
throws_ok
{
$mapper
->
t
o_accession
(
bless
({},
'
Someclass
'))
}
qr /not
found
/
,
"
t
o_accession
raises exception
";
map
{
is
(
$mapper
->
to_accession
(
$_
->
{
obj
}),
$_
->
{
accession
},
sprintf
"
%s maps to correct accession
",
ref
(
$_
->
{
obj
}))
and
is
(
$mapper
->
to_name
(
$_
->
{
obj
}),
$_
->
{
name
},
sprintf
"
%s maps to correct
",
ref
(
$_
->
{
obj
}))
}
is
(
$mapper
->
to_name
(
$_
->
{
obj
}),
$_
->
{
name
},
sprintf
"
%s maps to correct
name
",
ref
(
$_
->
{
obj
}))
}
@
{
$mappings
};
done_testing
();
...
...
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