Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
AMIBIO
VARNA-api
Commits
f2899051
Commit
f2899051
authored
Dec 05, 2020
by
htyao
Browse files
Code for comparison mode
parent
91ecb4a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
varnaapi.py
View file @
f2899051
...
...
@@ -596,3 +596,21 @@ class VARNA:
def
__repr__
(
self
):
return
repr
((
self
.
format_structure
(),
self
.
sequence
))
class
Comparison
(
VARNA
):
def
__init__
(
self
,
seq1
,
structure1
,
seq2
,
structure2
):
if
not
(
len
(
seq1
)
==
len
(
structure1
)
==
len
(
seq2
)
==
len
(
structure2
)):
raise
Exception
(
"All length should be equal"
)
self
.
seq1
=
seq1
self
.
structure1
=
structure1
self
.
seq2
=
seq2
self
.
structure2
=
structure2
self
.
length
=
len
(
seq1
)
self
.
_init_features
()
def
_gen_input_cmd
(
self
):
return
" -comparisonMode True -firstSequence
\"
{}
\"
-firstStructure
\"
{}
\"
-secondSequence
\"
{}
\"
-secondStructure
\"
{}
\"
"
.
format
(
self
.
seq1
,
self
.
structure1
,
self
.
seq2
,
self
.
structure2
)
def
__repr__
(
self
):
return
repr
((
self
.
seq1
,
self
.
structure1
,
self
.
seq2
,
self
.
structure2
))
Write
Preview
Supports
Markdown
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!
Cancel
Please
register
or
sign in
to comment