Sequence container used throughout ConKit
Sequence
(id, seq)[source]¶Bases: conkit.core._entity._Entity
A sequence template to store all associated information
Examples
>>> from conkit.core import Sequence
>>> sequence_entry = Sequence("example", "ABCDEF")
>>> print(sequence_entry)
Sequence(id="example" seq="ABCDEF" seqlen=6)
Attributes
id |
The ID of the selected entity |
remark |
The Sequence -specific remarks |
seq |
The protein sequence as str |
seq_len |
The protein sequence length |
Methods
add (entity) |
Add a child to the Entity |
align_global (other[, id_chars, nonid_chars, …]) |
Generate a global alignment between two Sequence instances |
align_local (other[, id_chars, nonid_chars, …]) |
Generate a local alignment between two Sequence instances |
copy () |
Create a shallow copy of Entity |
deepcopy () |
Create a deep copy of Entity |
remove (id) |
Remove a child |
align_global
(other, id_chars=2, nonid_chars=1, gap_open_pen=-0.5, gap_ext_pen=-0.1, inplace=False)[source]¶Generate a global alignment between two Sequence
instances
Parameters: | other : id_chars : int, optional nonid_chars : int, optional gap_open_pen : float, optional gap_ext_pen : float, optional inplace : bool, optional
|
---|---|
Returns: | obj
obj
|
align_local
(other, id_chars=2, nonid_chars=1, gap_open_pen=-0.5, gap_ext_pen=-0.1, inplace=False)[source]¶Generate a local alignment between two Sequence
instances
Parameters: | other : id_chars : int, optional nonid_chars : int, optional gap_open_pen : float, optional gap_ext_pen : float, optional inplace : bool, optional
|
---|---|
Returns: | obj
obj
|
seq
¶The protein sequence as str
seq_ascii
¶The protein sequence as ASCII-encoded str
seq_len
¶The protein sequence length