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
8bc56931
Commit
8bc56931
authored
20 years ago
by
Graham McVicker
Browse files
Options
Downloads
Patches
Plain Diff
added tests for new SeqEdit class
parent
7a859a6c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/t/seqEdit.t
+91
-0
91 additions, 0 deletions
modules/t/seqEdit.t
with
91 additions
and
0 deletions
modules/t/seqEdit.t
0 → 100644
+
91
−
0
View file @
8bc56931
use
lib
'
t
';
BEGIN
{
$|
=
1
;
use
Test
;
plan
tests
=>
27
;
}
use
Bio::EnsEMBL::
SeqEdit
;
use
Bio::EnsEMBL::
Attribute
;
use
TestUtils
qw(debug test_getter_setter)
;
my
$code
=
'
rna edit
';
my
$desc
=
'
Post transcriptional RNA edit
';
my
$value
=
'
2 3 ACTG
';
my
$name
=
'
RNA Edit
';
my
$a
=
Bio::EnsEMBL::
Attribute
->
new
(
-
CODE
=>
$code
,
-
DESCRIPTION
=>
$desc
,
-
VALUE
=>
$value
,
-
NAME
=>
$name
);
my
$se
=
Bio::EnsEMBL::
SeqEdit
->
new
(
-
ATTRIB
=>
$a
);
ok
(
ref
(
$se
)
&&
$se
->
isa
('
Bio::EnsEMBL::SeqEdit
'));
ok
(
$se
->
name
()
eq
$name
);
ok
(
$se
->
description
()
eq
$desc
);
ok
(
$se
->
code
()
eq
$code
);
ok
(
$se
->
alt_seq
()
eq
'
ACTG
');
ok
(
$se
->
start
()
==
2
);
ok
(
$se
->
end
()
==
3
);
ok
(
test_getter_setter
(
$se
,
'
start
',
10
));
ok
(
test_getter_setter
(
$se
,
'
end
',
12
));
ok
(
test_getter_setter
(
$se
,
'
alt_seq
',
'
GGAAA
'));
ok
(
test_getter_setter
(
$se
,
'
name
',
'
test name
'));
ok
(
test_getter_setter
(
$se
,
'
description
',
'
test desc
'));
ok
(
test_getter_setter
(
$se
,
'
code
',
'
test cpde
'));
ok
(
$se
->
length_diff
==
2
);
my
$seq
=
'
CCCC
';
$se
->
apply_edit
(
\
$seq
);
ok
(
$seq
eq
'
CACTGC
');
# test insert before first base
$seq
=
'
ACTG
';
$se
->
alt_seq
('
CC
');
$se
->
start
(
1
);
$se
->
end
(
0
);
ok
(
$se
->
apply_edit
(
\
$seq
));
ok
(
$seq
eq
'
CCACTG
');
ok
(
$se
->
length_diff
()
==
2
);
# test insert after last base
$seq
=
'
ACTG
';
$se
->
alt_seq
('
CC
');
$se
->
start
(
5
);
$se
->
end
(
4
);
$se
->
apply_edit
(
\
$seq
);
ok
(
$seq
eq
'
ACTGCC
');
ok
(
$se
->
length_diff
()
==
2
);
# test deletion of entire sequence
$seq
=
'
ACTG
';
$se
->
alt_seq
('');
$se
->
start
(
1
);
$se
->
end
(
4
);
$se
->
apply_edit
(
\
$seq
);
ok
(
$seq
eq
'');
ok
(
$se
->
length_diff
()
==
-
4
);
# test replacement of some sequence
$seq
=
'
ACTG
';
$se
->
alt_seq
('
TC
');
$se
->
start
(
2
);
$se
->
end
(
3
);
$se
->
apply_edit
(
\
$seq
);
ok
(
$seq
eq
'
ATCG
');
# test conversion to attribute
$a
=
$se
->
get_Attribute
();
ok
(
$a
->
name
()
eq
$se
->
name
());
ok
(
$a
->
description
()
eq
$se
->
description
());
ok
(
$a
->
code
()
eq
$se
->
code
());
ok
(
$a
->
value
eq
'
2 3 TC
');
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