biopython v1.71.0 Bio.Restriction.PrintFormat.PrintFormat

PrintFormat allow the printing of results of restriction analysis.

Link to this section Summary

Functions

Initialise

Next section (PRIVATE)

Summarise a list of positions by enzyme (PRIVATE)

Summarise list of positions per enzyme (PRIVATE)

Summarise mapping information as a string (PRIVATE)

Make string describing cutting map (PRIVATE)

Summarise non-cutting enzymes (PRIVATE)

Summarise non-cutting enzymes (PRIVATE)

Format cutting position information as a string (PRIVATE)

Summarise number of cuts as a string (PRIVATE)

Summarise results as a nicely formatted string

Virtual method used for formatting results

Print the results as specified

Print the output of the format_output method (OBSOLETE)

Link to this section Functions

Initialise.

Link to this function __next_section()

Next section (PRIVATE).

Arguments:

  • ls is a tuple/list of tuple (string, [int, int]).
  • into is a string to which the formatted ls will be added.

Format ls as a string of lines: The form is::

enzyme1     :   position1.
enzyme2     :   position2, position3.

then add the formatted ls to tot return tot.

Summarise a list of positions by enzyme (PRIVATE).

Return a string of form::

title.

enzyme1     :   position1, position2.
enzyme2     :   position1, position2, position3.

Arguments:

  • ls is a tuple or list of cutting enzymes.
  • title is the title.
  • nc is a tuple or list of non cutting enzymes.
  • s1 is the sentence before the non cutting enzymes.
Link to this function _make_list_only()

Summarise list of positions per enzyme (PRIVATE).

Return a string of form::

title.

enzyme1     :   position1, position2.
enzyme2     :   position1, position2, position3.
...

Arguments:

  • ls is a tuple or list of results.
  • title is a string.
  • Non cutting enzymes are not included.

Summarise mapping information as a string (PRIVATE).

Return a string of form::

| title.
|
|     enzyme1, position
|     |
| AAAAAAAAAAAAAAAAAAAAA...
| |||||||||||||||||||||
| TTTTTTTTTTTTTTTTTTTTT...

Arguments:

  • ls is a list of cutting enzymes.
  • title is the title.
  • nc is a list of non cutting enzymes.
  • s1 is the sentence before the non cutting enzymes.
Link to this function _make_map_only()

Make string describing cutting map (PRIVATE).

Return a string of form::

| title.
|
|     enzyme1, position
|     |
| AAAAAAAAAAAAAAAAAAAAA...
| |||||||||||||||||||||
| TTTTTTTTTTTTTTTTTTTTT...

Arguments:

  • ls is a list of results.
  • title is a string.
  • Non cutting enzymes are not included.

Summarise non-cutting enzymes (PRIVATE).

Return a formatted string of the non cutting enzymes.

ls is a list of cutting enzymes -> will not be used. Here for compatibility with make_format.

Arguments:

  • title is the title.
  • nc is a list of non cutting enzymes.
  • s1 is the sentence before the non cutting enzymes.
Link to this function _make_nocut_only()

Summarise non-cutting enzymes (PRIVATE).

Return a formatted string of the non cutting enzymes.

Arguments:

  • nc is a tuple or list of non cutting enzymes.
  • s1 is the sentence before the non cutting enzymes.

Format cutting position information as a string (PRIVATE).

Returns a string in the form::

title.

enzyme which cut 1 time:

enzyme1     :   position1.

enzyme which cut 2 times:

enzyme2     :   position1, position2.
...

Arguments:

  • ls is a list of cutting enzymes.
  • title is the title.
  • nc is a list of non cutting enzymes.
  • s1 is the sentence before the non cutting enzymes.
Link to this function _make_number_only()

Summarise number of cuts as a string (PRIVATE).

Return a string of form::

title.

enzyme which cut 1 time:

enzyme1     :   position1.

enzyme which cut 2 times:

enzyme2     :   position1, position2.
...

Arguments:

  • ls is a list of results.
  • title is a string.
  • Non cutting enzymes are not included.
Link to this function format_output()

Summarise results as a nicely formatted string.

Arguments:

  • dct is a dictionary as returned by a RestrictionBatch.search()
  • title is the title of the map. It must be a formatted string, i.e. you must include the line break.
  • s1 is the title separating the list of enzymes that have sites from those without sites.
  • s1 must be a formatted string as well.

The format of print_that is a list.

Virtual method used for formatting results.

Virtual method. Here to be pointed to one of the make* methods. You can as well create a new method and point make_format to it.