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
33e2e5d3
Commit
33e2e5d3
authored
18 years ago
by
Felix Kokocinski
Browse files
Options
Downloads
Patches
Plain Diff
modules/t/ditag.t
parent
bad5394f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
modules/t/ditagAdaptor.t
+7
-7
7 additions, 7 deletions
modules/t/ditagAdaptor.t
modules/t/ditagFeature.t
+1
-1
1 addition, 1 deletion
modules/t/ditagFeature.t
modules/t/ditagFeatureAdaptor.t
+23
-15
23 additions, 15 deletions
modules/t/ditagFeatureAdaptor.t
with
31 additions
and
23 deletions
modules/t/ditagAdaptor.t
+
7
−
7
View file @
33e2e5d3
...
...
@@ -51,7 +51,7 @@ ok($ditag_adaptor->store(\@ditags));
#test fetch_all_by_name
my
$ditags
=
$ditag_adaptor
->
fetch_by_name
(
$name
);
my
$ditags
=
$ditag_adaptor
->
fetch_
all_
by_name
(
$name
);
#if feature was stored it has a dbID now
ok
(
scalar
(
@$ditags
)
&&
$ditags
->
[
0
]
->
isa
('
Bio::EnsEMBL::Map::Ditag
'));
ok
(
$ditags
->
[
0
]
->
name
eq
$name
);
...
...
@@ -70,11 +70,11 @@ ok($ditags->[0]->type eq $type);
# 7-8 #
#######
#test fetch_
all_
by_name_and_type
#test fetch_by_name_and_type
$ditag
s
=
$ditag_adaptor
->
fetch_
all_
by_name_and_type
(
$name
,
$type
);
ok
(
scalar
(
@
$ditag
s
)
&&
$ditag
s
->
[
0
]
->
isa
('
Bio::EnsEMBL::Map::Ditag
'));
ok
(
$ditag
s
->
[
0
]
->
type
eq
$type
&&
$ditag
s
->
[
0
]
->
name
eq
$name
);
my
$ditag
=
$ditag_adaptor
->
fetch_by_name_and_type
(
$name
,
$type
);
ok
(
$ditag
&&
$ditag
->
isa
('
Bio::EnsEMBL::Map::Ditag
'));
ok
(
$ditag
->
type
eq
$type
&&
$ditag
->
name
eq
$name
);
######
# 9 #
...
...
@@ -91,8 +91,8 @@ $multi->restore('core', 'ditag');
# 10 #
######
#test fetch_with_limit
$ditags
=
$ditag_adaptor
->
fetch_with_limit
(
$type
,
5
,
0
);
#test fetch_
all_
with_limit
$ditags
=
$ditag_adaptor
->
fetch_
all_
with_limit
(
$type
,
5
,
0
);
ok
((
scalar
(
@$ditags
)
==
5
)
&&
$ditags
->
[
0
]
->
isa
('
Bio::EnsEMBL::Map::Ditag
'));
######
...
...
This diff is collapsed.
Click to expand it.
modules/t/ditagFeature.t
+
1
−
1
View file @
33e2e5d3
...
...
@@ -62,7 +62,7 @@ ok($feature && $feature->isa('Bio::EnsEMBL::Map::DitagFeature'));
# hit_strand, cigar_line, start, end, strand,
# dbID, sequence, slice, ditag_pair_id
my
$ditagFeatures
=
$dfa
->
fetch_by_ditagID
(
$ditag_id
);
my
$ditagFeatures
=
$dfa
->
fetch_
all_
by_ditagID
(
$ditag_id
);
my
$ditagFeature
=
$ditagFeatures
->
[
0
];
ok
(
defined
$ditagFeature
&&
$ditagFeature
->
isa
('
Bio::EnsEMBL::Map::DitagFeature
'));
...
...
This diff is collapsed.
Click to expand it.
modules/t/ditagFeatureAdaptor.t
+
23
−
15
View file @
33e2e5d3
...
...
@@ -2,7 +2,7 @@ use strict;
BEGIN
{
$|
=
1
;
use
Test
;
plan
tests
=>
1
2
;
plan
tests
=>
1
4
;
}
use
Bio::EnsEMBL::Test::
MultiTestDB
;
...
...
@@ -14,25 +14,24 @@ use Bio::EnsEMBL::Analysis;
my
$multi
=
Bio::EnsEMBL::Test::
MultiTestDB
->
new
();
my
$db
=
$multi
->
get_DBAdaptor
(
'
core
'
);
my
$region
=
11
;
my
$region
=
'
11
'
;
my
$ditag_id
=
1
;
my
$qstart
=
120635196
;
my
$qend
=
120635214
;
my
$qstrand
=
1
;
my
$qstart
=
83225874
;
my
$qend
=
83236347
;
my
$qstrand
=
-
1
;
my
$tstart
=
3
;
my
$tend
=
19
;
my
$tstrand
=
1
;
my
$ditag_side
=
'
L
';
my
$ditag_pair_id
=
1
;
my
$cigar_line
=
'
17M
',
my
$t
ype
=
"
ZZ13
"
;
my
$t
ag_library
=
'
ZZ13
'
;
my
$logic_name
=
'
DitagAlign
';
my
$dbID
=
4828567
;
my
$other_ditag
=
3278337
;
#469273
my
$slice
=
$db
->
get_SliceAdaptor
->
fetch_by_region
('
chromosome
',
$region
);
my
$analysis
=
$db
->
get_AnalysisAdaptor
->
fetch_by_logic_name
(
'
DitagAlign
'
);
my
$analysis
=
$db
->
get_AnalysisAdaptor
->
fetch_by_logic_name
(
$logic_name
);
######
# 1 #
...
...
@@ -85,7 +84,7 @@ ok($testfeature && $testfeature->isa('Bio::EnsEMBL::Map::DitagFeature'));
$multi
->
restore
('
core
',
'
ditag_feature
');
########
# 5-1
1
#
# 5-1
3
#
########
#test fetch methods
...
...
@@ -99,28 +98,37 @@ my $df = $dfa->fetch_by_dbID($dbID);
ok
(
$df
&&
$df
->
isa
('
Bio::EnsEMBL::Map::DitagFeature
')
&&
$df
->
dbID
==
$dbID
);
#test fetch by ditagID
$dfs
=
$dfa
->
fetch_by_ditagID
(
$other_ditag
);
$dfs
=
$dfa
->
fetch_
all_
by_ditagID
(
$other_ditag
);
ok
((
scalar
@$dfs
==
2
)
&&
$dfs
->
[
0
]
->
isa
('
Bio::EnsEMBL::Map::DitagFeature
')
&&
$dfs
->
[
0
]
->
ditag_id
==
$other_ditag
);
#test fetch by type
$dfs
=
$dfa
->
fetch_all_by_type
(
$t
ype
);
$dfs
=
$dfa
->
fetch_all_by_type
(
$t
ag_library
);
ok
((
scalar
@$dfs
)
&&
$dfs
->
[
0
]
->
isa
('
Bio::EnsEMBL::Map::DitagFeature
')
&&
$dfs
->
[
0
]
->
fetch_ditag
->
type
eq
$t
ype
);
&&
$dfs
->
[
0
]
->
fetch_ditag
->
type
eq
$t
ag_library
);
# test fetch all by slice
$slice
=
$db
->
get_SliceAdaptor
->
fetch_by_region
('
chromosome
',
$region
,
$qstart
,
$qend
);
#use slice only
$dfs
=
$dfa
->
fetch_all_by_Slice
(
$slice
);
ok
(
scalar
(
@$dfs
)
&&
$dfs
->
[
0
]
->
isa
('
Bio::EnsEMBL::Map::DitagFeature
'));
#use tag-library
$dfs
=
$dfa
->
fetch_all_by_Slice
(
$slice
,
$tag_library
);
ok
(
scalar
(
@$dfs
)
&&
$dfs
->
[
0
]
->
isa
('
Bio::EnsEMBL::Map::DitagFeature
'));
#use logic-name
$dfs
=
$dfa
->
fetch_all_by_Slice
(
$slice
,
'',
$logic_name
);
ok
(
1
);
#scalar(@$dfs) && $dfs->[0]->isa('Bio::EnsEMBL::Map::DitagFeature'));
#test fetch_grouped
$dfs
=
$dfa
->
fetch_grouped
('',
$t
ype
);
$dfs
=
$dfa
->
fetch_grouped
('',
$t
ag_library
);
ok
(
scalar
@$dfs
);
ok
(
$dfs
->
[
0
]
->
{'
ditag_id
'}
&&
$dfs
->
[
0
]
->
{'
start
'}
&&
$dfs
->
[
0
]
->
{'
end
'});
######
# 1
2
#
# 1
4
#
######
#test list_dbIDs
...
...
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