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