Selection.
to_string
()¶Provide the values of the Selection
as a string.
Returns: | str |
---|
Example
In [1]: from rstoolbox.components import Selection
...: ss = Selection([3, 4, 5, 13, 14, 15, 21, 25])
...: ss.to_string()
...:
Out[1]: '3-5,13-15,21,25'
If the Selection
is is_shifted()
, it
will write in PDB annotation.
In [2]: ss.shift("A", 3).to_string()
Out[2]: '5A-7A,15A-17A,23A,27A'