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
1c2821aa
Commit
1c2821aa
authored
23 years ago
by
Laura Clarke
Browse files
Options
Downloads
Patches
Plain Diff
added a test for repeat_Feature and repeat_consensus and added an extra analysis to testdb
parent
8387dfb9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/t/minidatabase.dump
+2
-0
2 additions, 0 deletions
modules/t/minidatabase.dump
modules/t/repeatfeature.t
+84
-0
84 additions, 0 deletions
modules/t/repeatfeature.t
with
86 additions
and
0 deletions
modules/t/minidatabase.dump
+
2
−
0
View file @
1c2821aa
...
...
@@ -15,6 +15,8 @@ INSERT into analysis (analysis_id,logic_name,gff_source,gff_feature) VALUES (2,"
INSERT into analysis (analysis_id,logic_name,db,db_version,gff_source,gff_feature) VALUES (3,"dummy-genscan","HumanIso.mat","1","genscan","prediction");
INSERT into analysis (analysis_id,logic_name,gff_source,gff_feature) VALUES (4,"dummy-repeatmask","repeatmask","repeat");
INSERT into dna(dna_id, sequence, created) values(1, 'ATGATCAGTACAGTTACAGTAGACACAGATGTAG', now());
...
...
This diff is collapsed.
Click to expand it.
modules/t/repeatfeature.t
0 → 100644
+
84
−
0
View file @
1c2821aa
use
lib
'
t
';
BEGIN
{
$|
=
1
;
use
Test
;
plan
tests
=>
11
;
}
my
$loaded
=
0
;
END
{
print
"
not ok 1
\n
"
unless
$loaded
;}
use
EnsTestDB
;
use
Bio::EnsEMBL::
DBLoader
;
$loaded
=
1
;
ok
(
1
);
# Database will be dropped when this
# object goes out of scope
my
$ens_test
=
EnsTestDB
->
new
;
$ens_test
->
do_sql_file
("
t/minidatabase.dump
");
ok
(
$ens_test
);
my
$db
=
$ens_test
->
get_DBSQL_Obj
;
$cadp
=
$db
->
get_RawContigAdaptor
();
$contig
=
$cadp
->
fetch_by_dbID
(
1
);
my
$analysis
=
$db
->
get_AnalysisAdaptor
->
fetch_by_newest_logic_name
("
dummy-repeatmask
");
print
STDERR
"
ANALYSIS
"
.
$analysis
.
"
\n
";
ok
(
$analysis
);
ok
(
$contig
);
$repeat_f_ad
=
$db
->
get_RepeatFeatureAdaptor
();
$repeat_c_ad
=
$db
->
get_RepeatConsensusAdaptor
();
print
STDERR
"
DBID
"
.
$analysis
->
dbID
.
"
\n
";
my
$repeat_consensus
=
Bio::EnsEMBL::
RepeatConsensus
->
new
();
$repeat_consensus
->
length
(
10
);
$repeat_consensus
->
repeat_class
('
dummy
');
$repeat_consensus
->
name
('
dummy
');
$repeat_consensus
->
repeat_consensus
('
ATGCATGCAT
');
ok
(
$repeat_consensus
);
$repeat_c_ad
->
store
(
$repeat_consensus
);
ok
(
1
);
my
$repeat_feature
=
Bio::EnsEMBL::
RepeatFeature
->
new
();
$repeat_feature
->
contig_id
(
$contig
->
dbID
);
$repeat_feature
->
start
(
26
);
$repeat_feature
->
end
(
65
);
$repeat_feature
->
strand
(
1
);
$repeat_feature
->
hstart
(
6
);
$repeat_feature
->
hend
(
45
);
$repeat_feature
->
score
(
100
);
$repeat_feature
->
analysis
(
$analysis
);
$repeat_feature
->
repeat_consensus
(
$repeat_consensus
);
ok
(
$repeat_feature
);
$repeat_f_ad
->
store
(
$contig
->
dbID
,
$repeat_feature
);
ok
(
1
);
my
@repeats
=
$repeat_f_ad
->
fetch_by_RawContig
(
$contig
);
my
$repeat
=
$repeats
[
0
];
ok
(
$repeat
);
ok
(
$repeat
->
start
==
26
);
ok
(
$repeat
->
hend
==
45
);
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