Package Bio :: Package Restriction :: Module Restriction :: Class FormattedSeq
[hide private]
[frames] | no frames]

Class FormattedSeq

source code

object --+

FormattedSeq(seq, [linear=True])-> new FormattedSeq.

Translate a Bio.Seq into a formatted sequence to be used with Restriction.


remove anything which is not IUPAC alphabet and then add a space in front of the sequence to get a biological index instead of a python index (i.e. index of the first base is 1 not 0).

Retains information about the shape of the molecule linear (default) or circular. Restriction sites are search over the edges of circular sequence.

Instance Methods [hide private]
__init__(self, seq, linear=True)
FormattedSeq(seq, [linear=True])-> new FormattedSeq.
source code
__len__(self) source code
source code
__eq__(self, other) source code
circularise FS
circularise(FS) source code
linearise FS
linearise(FS) source code
new linear FS instance
to_linear(FS) source code
new circular FS instance
to_circular(FS) source code
True if the sequence will analysed as a linear sequence.
source code
finditer(FS, pattern, size)
return a list of pattern into the sequence. the list is made of tuple (location, the latter is used with non palindromic sites. pattern is the regular expression pattern corresponding to the enzyme restriction site. size is the size of the restriction enzyme recognition-site size.
source code
__getitem__(self, i) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, seq, linear=True)

source code 

FormattedSeq(seq, [linear=True])-> new FormattedSeq.

seq is either a Bio.Seq, Bio.MutableSeq or a FormattedSeq. if seq is a FormattedSeq, linear will have no effect on the shape of the sequence.

Overrides: object.__init__

(Representation operator)

source code 
Overrides: object.__repr__
(inherited documentation)