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

Class FormattedSeq

source code

object --+
         |
        FormattedSeq

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

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

Roughly:

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
 
__repr__(self)
repr(x)
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
bool
is_linear(FS)
True if the sequence will analysed as a linear sequence.
source code
list
finditer(FS, pattern, size)
return a list of pattern into the sequence.
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)
(Constructor)

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__

__repr__(self)
(Representation operator)

source code 
repr(x)

Overrides: object.__repr__
(inherited documentation)

finditer(FS, pattern, size)

source code 
return a list of pattern into the sequence. the list is made of tuple (location, pattern.group). 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.
Returns: list