Selection.
shift
(seqID, shift)¶Shifts the Selection
according to a value and sets
up the chain to which it is associated.
There are two ways in which a shift can be provided:
int
specifying the numerical identity of the first position of the sequence. As Selection
works with sequence positioning, shifting by 1 is the same as not shifting at all (although then the seqID
will be added and the Selection
will be considered as shifted).In [1]: from rstoolbox.components import Selection
...: ss = Selection([3, 4, 5, 13, 14, 15, 21, 25])
...: ss.shift("A", 3)
...:
Out[1]: 5A-7A,15A-17A,23A,27A
In [2]: ss.shift("A", 1)