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

Class Analysis

source code

         object --+        
                  |        
                set --+    
                      |    
       RestrictionBatch --+
                          |
             object --+   |
                      |   |
PrintFormat.PrintFormat --+
                          |
                         Analysis

Provide methods for enhanced analysis and pretty printing.
Instance Methods [hide private]
new empty set object
__init__(self, restrictionbatch=RestrictionBatch([]), sequence=Seq('', Alphabet()), linear=True)
Initialize an Analysis with RestrictionBatch and sequence.
source code
 
__repr__(self)
repr(x)
source code
 
_sub_set(self, wanted)
Filter result for keys which are in wanted.
source code
 
_boundaries(self, start, end)
Set boundaries to correct values.
source code
 
_test_normal(self, start, end, site)
Test if site is between start and end.
source code
 
_test_reverse(self, start, end, site)
Test if site is between end and start (for circular sequences).
source code
 
format_output(self, dct=None, title='', s1='')
Collect data and pass to PrintFormat.
source code
 
print_that(self, dct=None, title='', s1='')
Print the output of the analysis.
source code
 
change(self, **what)
Change parameters of print output.
source code
 
full(self, linear=True)
Perform analysis with all enzymes of batch and return all results.
source code
 
blunt(self, dct=None)
Return only cuts that have blunt ends.
source code
 
overhang5(self, dct=None)
Return only cuts that have 5' overhangs.
source code
 
overhang3(self, dct=None)
Return only cuts that have 3' overhangs.
source code
 
defined(self, dct=None)
Return only results from enzymes that produce defined overhangs.
source code
 
with_sites(self, dct=None)
Return only results from enzyme with at least one cut.
source code
 
without_site(self, dct=None)
Return only results from enzymes that don't cut the sequence.
source code
 
with_N_sites(self, N, dct=None)
Return only results from enzymes that cut the sequence N times.
source code
 
with_number_list(self, list, dct=None)
Return only results from enzymes that cut (x,y,z,...) times.
source code
 
with_name(self, names, dct=None)
Return only results from enzymes which names are listed.
source code
 
with_site_size(self, site_size, dct=None)
Return only results form enzymes with a given site size.
source code
 
only_between(self, start, end, dct=None)
Return only results from enzymes that only cut within start, end.
source code
 
between(self, start, end, dct=None)
Return only results from enzymes that cut at least within borders.
source code
 
show_only_between(self, start, end, dct=None)
Return only results from within start, end.
source code
 
only_outside(self, start, end, dct=None)
Return only results from enzymes that only cut outside start, end.
source code
 
outside(self, start, end, dct=None)
Return only results from enzymes that at least cut outside borders.
source code
 
do_not_cut(self, start, end, dct=None)
Return only results from enzymes that don't cut between borders.
source code

Inherited from RestrictionBatch: __add__, __contains__, __div__, __iadd__, __rdiv__, __rtruediv__, __str__, __truediv__, add, add_nocheck, add_supplier, as_string, current_suppliers, elements, format, get, is_restriction, lambdasplit, remove, search, split

Inherited from set: __and__, __cmp__, __eq__, __ge__, __getattribute__, __gt__, __iand__, __ior__, __isub__, __iter__, __ixor__, __le__, __len__, __lt__, __ne__, __new__, __or__, __rand__, __reduce__, __ror__, __rsub__, __rxor__, __sizeof__, __sub__, __xor__, clear, copy, difference, difference_update, discard, intersection, intersection_update, isdisjoint, issubset, issuperset, pop, symmetric_difference, symmetric_difference_update, union, update

Inherited from PrintFormat.PrintFormat: make_format, print_as

Inherited from object: __delattr__, __format__, __reduce_ex__, __setattr__, __subclasshook__

Class Methods [hide private]

Inherited from RestrictionBatch: show_codes, suppl_codes

Class Variables [hide private]

Inherited from set: __hash__

Inherited from PrintFormat.PrintFormat: Cmodulo, ConsoleWidth, Indent, MaxSize, NameWidth, PrefWidth, linesize

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, restrictionbatch=RestrictionBatch([]), sequence=Seq('', Alphabet()), linear=True)
(Constructor)

source code 

Initialize an Analysis with RestrictionBatch and sequence.

Analysis([restrictionbatch [, sequence] linear=True]) -> New Analysis class.

For most of the methods of this class if a dictionary is given it will be used as the base to calculate the results. If no dictionary is given a new analysis using the RestrictionBatch which has been given when the Analysis class has been instantiated, will be carried out and used.

Returns: new empty set object
Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 
repr(x)
Overrides: object.__repr__
(inherited documentation)

_sub_set(self, wanted)

source code 

Filter result for keys which are in wanted.

A._sub_set(other_set) -> dict.

Internal use only.

Screen the results through wanted set. Keep only the results for which the enzymes is in wanted set.

_boundaries(self, start, end)

source code 

Set boundaries to correct values.

Format the boundaries for use with the methods that limit the search to only part of the sequence given to analyse.

_test_normal(self, start, end, site)

source code 

Test if site is between start and end.

Internal use only

_test_reverse(self, start, end, site)

source code 

Test if site is between end and start (for circular sequences).

Internal use only.

format_output(self, dct=None, title='', s1='')

source code 

Collect data and pass to PrintFormat.

A.format_output([dct[, title[, s1]]]) -> dct.

If dct is not given the full dictionary is used.

Overrides: PrintFormat.PrintFormat.format_output

print_that(self, dct=None, title='', s1='')

source code 

Print the output of the analysis.

A.print_that([dct[, title[, s1[,print_]]]]) -> print the results from dct.

If dct is not given the full dictionary is used. s1: Title for non-cutting enzymes This method prints the output of A.format_output() and it is here for backwards compatibility.

Overrides: PrintFormat.PrintFormat.print_that

change(self, **what)

source code 

Change parameters of print output.

A.change(**attribute_name) -> Change attribute of Analysis.

It is possible to change the width of the shell by setting self.ConsoleWidth to what you want. self.NameWidth refer to the maximal length of the enzyme name.

Changing one of these parameters here might not give the results you expect. In which case, you can settle back to a 80 columns shell or try to change self.Cmodulo and self.PrefWidth in PrintFormat until you get it right.

full(self, linear=True)

source code 

Perform analysis with all enzymes of batch and return all results.

A.full() -> dict.

Full Restriction Map of the sequence.

between(self, start, end, dct=None)

source code 

Return only results from enzymes that cut at least within borders.

Enzymes that cut the sequence at least in between start and end. They may cut outside as well.

show_only_between(self, start, end, dct=None)

source code 

Return only results from within start, end.

Enzymes must cut inside start/end and may also cut outside. However, only the cutting positions within start/end will be returned.

only_outside(self, start, end, dct=None)

source code 

Return only results from enzymes that only cut outside start, end.

Enzymes that cut the sequence outside of the region in between start and end but do not cut inside.

outside(self, start, end, dct=None)

source code 

Return only results from enzymes that at least cut outside borders.

Enzymes that cut outside the region in between start and end. They may cut inside as well.