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
466ff2c2
Commit
466ff2c2
authored
21 years ago
by
Arne Stabenau
Browse files
Options
Downloads
Patches
Plain Diff
somw more tests for alingments and cordinate transforms
parent
e2bbbc5c
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
+54
-4
54 additions, 4 deletions
modules/t/dbEntries.t
with
54 additions
and
4 deletions
modules/t/dbEntries.t
+
54
−
4
View file @
466ff2c2
...
...
@@ -4,13 +4,14 @@ use warnings;
BEGIN
{
$|
=
1
;
use
Test
;
plan
tests
=>
1
2
;
plan
tests
=>
1
4
;
}
use
MultiTestDB
;
use
TestUtils
qw (
debug
test_getter_setter
);
use
Bio::EnsEMBL::
DBEntry
;
use
Bio::EnsEMBL::
ProteinFeature
;
# switch on the debug prints
...
...
@@ -101,19 +102,33 @@ my $goref = Bio::EnsEMBL::GoXref->new
);
$goref
->
add_linkage_type
(
"
IC
"
);
my
$analysis
=
Bio::EnsEMBL::
Analysis
->
new
(
-
logic_name
=>
'
protmap
',
-
program
=>
'
pmatch
',
-
database
=>
'
pmatch
'
);
my
$ident_xref
=
Bio::EnsEMBL::
IdentityXref
->
new
(
-
primary_id
=>
"
1
",
-
dbname
=>
"
SPTREMBL
",
-
release
=>
"
1
",
-
display_id
=>
"
Ens related Ident
"
-
display_id
=>
"
Ens related Ident
",
-
cigar_line
=>
"
10MDI2M3D2M3I5M
",
-
translation_start
=>
1
,
-
translation_end
=>
23
,
-
hit_start
=>
1
,
-
hit_end
=>
23
,
-
score
=>
20.0
,
-
evalue
=>
123
,
-
analysis
=>
$analysis
);
$ident_xref
->
query_identity
(
100
);
$ident_xref
->
target_identity
(
95
);
$multi
->
hide
(
"
core
",
"
object_xref
",
"
xref
",
"
identity_xref
",
"
go_xref
"
);
$multi
->
hide
(
"
core
",
"
object_xref
",
"
xref
",
"
identity_xref
",
"
go_xref
"
,
"
analysis
"
);
my
$gene
=
$ga
->
fetch_by_dbID
(
$all_gene_ids
->
[
0
]
);
...
...
@@ -122,6 +137,8 @@ my $tl = $tr->translation();
$dbEntryAdaptor
->
store
(
$xref
,
$gene
,
"
Gene
"
);
$dbEntryAdaptor
->
store
(
$xref
,
$tr
,
"
Transcript
"
);
$dbEntryAdaptor
->
store
(
$goref
,
$tl
,
"
Translation
"
);
...
...
@@ -183,11 +200,44 @@ debug( "Number of identity_xrefs = $ident_count" );
ok
(
$ident_count
==
2
);
my
$protein_feature
=
Bio::EnsEMBL::
ProteinFeature
->
new
(
-
start
=>
1
,
-
end
=>
23
,
-
seqname
=>
'
SP0001
'
);
my
$mapper
=
$ident_xref
->
get_mapper
();
debug
(
"
Mapper
"
.
ref
(
$mapper
)
);
my
$copy_features
=
$ident_xref
->
transform_feature
(
$protein_feature
);
for
my
$feat
(
@$copy_features
)
{
debug
(
join
("
\n
",
map
({
$_
.
"
->
"
.
$feat
->
{
$_
}
}
keys
%$feat
)
));
debug
(
"
------------
");
}
# 4 M-sections in the xref make 4 mapped sections
#
# 10 mapping features via alignment
#
ok
(
scalar
(
@$copy_features
)
==
4
);
# 10M is the first matching section
#
# 11 mapping first section to 1-10
#
ok
(
$copy_features
->
[
0
]
->
start
()
==
1
&&
$copy_features
->
[
0
]
->
end
()
==
10
);
$multi
->
restore
();
#
# 1
0
-1
2
Test that external synonyms and go evidence tags are retrieved
# 1
2
-1
4
Test that external synonyms and go evidence tags are retrieved
#
my
$ta
=
$db
->
get_TranscriptAdaptor
();
my
$translation
=
$ta
->
fetch_by_dbID
(
21737
)
->
translation
;
...
...
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