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
0c76bfcd
Commit
0c76bfcd
authored
Dec 05, 2020
by
htyao
Browse files
Add example of add_annotation
parent
57480deb
Changes
1
Hide whitespace changes
Inline
Side-by-side
varnaapi.py
View file @
0c76bfcd
...
...
@@ -509,7 +509,7 @@ class VARNA:
>>> style2 = BasesStyle(fill="#FFFF00" outline="#00FF00")
>>> varna.add_bases_style(style1, [0,2,4])
>>> varna.add_bases_style(setye1, [10,11,12])
>>> varna.a
ff
_bases_style(style2, [4,5,6,7])
>>> varna.a
dd
_bases_style(style2, [4,5,6,7])
"""
if
not
isinstance
(
style
,
BasesStyle
):
...
...
@@ -521,6 +521,10 @@ class VARNA:
def
add_annotation
(
self
,
annotation
:
_Annotation
):
"""Add an annotation.
Argument should be a valid [Annotation](/annotation/) object
Examples:
>>> a = LoopAnnotation("L1", 6, color="#FF00FF")
>>> varna.add_annotation(a)
"""
# Assert is annotation
if
not
isinstance
(
annotation
,
_Annotation
):
...
...
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