SequenceFeaturesBar¶
-
class
visualife.widget.SequenceFeaturesBar(viewport, sequence_ids=[], seq_len=0, **kwargs)¶ Bases:
objectDraws a sequence features widget.
This widget displays a sequence or sequences, representing them by a row of featured regions. Each region as well as each sequence is identified by a name
Parameters: - viewport – where to draw the widget
- sequence_ids – a list of IDs for displayed sequences; sequences can also be added with
add_sequence()method - kwargs – see below
Keyword Arguments: - arrow_fill (
string) – provides color to fill an arrow; arrow border will be made darker than the given fill
Methods Summary
add_sequence(seq_name, **kwargs)Adds a new row to this widget. add_to_region(sequence_name, region_name[, …])Adds parts of sequence to the region_name of given sequence delete_region(sequence_name, region_name)Deletes region for the given sequence delete_regions()draw()Draws whole widget show_tooltip(evt)Shows tooltip with description of event target annotation Methods Documentation
-
add_sequence(seq_name, **kwargs)¶ Adds a new row to this widget.
Each row represents a protein / nucleic sequence. Annotations for this sequence may be added with
add_to_region()method :param seq_name: (string) name of a new sequence, it will be displayed by this widget. It’salso used to identify this sequence inadd_to_region()methodParameters: kwargs – drawing parameters
-
add_to_region(sequence_name, region_name, if_show_region=True, **kwargs)¶ Adds parts of sequence to the region_name of given sequence
-
delete_region(sequence_name, region_name)¶ Deletes region for the given sequence
-
delete_regions()¶
-
draw()¶ Draws whole widget
-
show_tooltip(evt)¶ Shows tooltip with description of event target annotation