RiboKit : Primerize

PCR Assembly Primer Design

primerize.wrapper Module

class primerize.wrapper.Design_Plate(init_dict)

Bases: object

Result of a primerize.Primerize_2D.design() or primerize.Primerize_3D.design() run.

Parameters:
  • init_dict -- A dict with the following keys:
  • sequence -- str: Sequence of assembly design.
  • name -- str: Construct prefix/name.
  • is_success -- bool: Flag for whether primerize.Primerize_2D.design() or primerize.Primerize_3D.design() run successfully found a solution.
  • primer_set -- list(str): List of primers for assembly.
  • structures -- list(str): (Optional) List of secondary structures, only Required for primerize.Primerize_3D.design() results.
  • params -- dict: Dictionary of parameters used for this result.
  • data -- dict: Dictionary of result data.
sequence

str: Sequence of assembly design.

name

str: Construct prefix/name.

is_success

bool: Flag for whether a solution is found.

primer_set

list(str): Strings of solution primers.

structures

list(str): Strings of input secondary structures.

_params

Input parameters, in format of dict: { 'offset': int, 'which_muts': list(int), 'which_lib': list(int), 'N_PRIMER': int, 'N_PLATE': int, 'N_CONSTRUCT': int, 'N_BP': int, 'type': str }.

For primerize.Primerize_3D.design() results, it also has 'N_MUTATION': int, 'is_exclude': bool, 'is_single': bool, 'is_fillWT': bool.

_data

Data of assembly solution, in format of

dict: {
    'constructs': primerize.Construct_List,
    'plates': list(list(primerize.Plate_96Well)),
    'assembly': primerize.Assembly,
    'illustration': { 'labels': list(str), 'fragments': list(str), 'lines': tuple(str) },
}

For primerize.Primerize_3D.design() results, it also has 'bps': list(tuple(int, int)), 'warnings': list(tuple(int, int)).

__repr__()

Representation of the Design_Plate class.

__str__()

Results of the Design_Plate class. Calls echo().

echo(key='')

Print part(s) of result in rich-text.

Parameters:

key -- str: (Optional) Keyword of printing. Valid keywords are 'plate', 'assembly', 'region'; case insensitive. When nonspecified, result of all keywords is returned.

Returns:

str

Raises:
  • AttributeError -- For illegal key.
  • UnboundLocalError -- When is_success = False.
get(key)

Get result parameters.

Parameters:key -- str: Keyword of parameter. Valid keywords are 'offset', 'which_muts', 'which_lib', 'N_PRIMER', 'N_PLATE', 'N_CONSTRUCT', 'N_BP', 'PRIMER', 'CONSTRUCT', ('is_exclude', 'is_signle', 'is_fillWT', 'STRUCTURE' and 'WARNING' only for primerize.Primerize_3D.design() results); case insensitive.
Returns:value of specified key.
Raises:AttributeError -- For illegal key.
save(key='', path='./', name=None)

Save result to text file.

Parameters:
  • key -- str: (Optional) Keyword of saving. Valid keywords are 'table', 'image', 'constructs', 'assembly', ('structures' only for primerize.Primerize_3D.design() results); case insensitive. When nonspecified, files of all keywords are saved.
  • path -- str: (Optional) Path for file saving. Use either relative or absolute path.
  • name -- str: (Optional) Prefix/name for file name. When nonspecified, current object's name is used.
Raises:
  • AttributeError -- For illegal key.
  • UnboundLocalError -- When is_success = False.
class primerize.wrapper.Design_Single(init_dict)

Bases: object

Result of a primerize.Primerize_1D.design() run.

Parameters:
  • init_dict -- A dict with the following keys:
  • sequence -- str: Sequence of assembly design.
  • name -- str: Construct prefix/name.
  • is_success -- bool: Flag for whether primerize.Primerize_1D.design() run successfully found a solution.
  • primer_set -- list(str): List of primers for assembly.
  • params -- dict: Dictionary of parameters used for this result.
  • data -- dict: Dictionary of result data.
sequence

str: Sequence of assembly design.

name

str: Construct prefix/name.

is_success

bool: Flag for whether a solution is found.

primer_set

list(str): Strings of solution primers.

_params

Input parameters, in format of dict: { 'MIN_TM': float, 'NUM_PRIMERS': int, 'MIN_LENGTH': int, 'MAX_LENGTH': int, 'N_BP': int, 'COL_SIZE': int, 'WARN_CUTOFF': int }.

_data

Data of assembly solution, in format of

dict: {
    'misprime_score': [str, str],
    'warnings': list(tuple(int, int, int, int)),
    'assembly': primerize.Assembly
}
__repr__()

Representation of the Design_Single class.

__str__()

Results of the Design_Single class. Calls echo().

echo(key='')

Print part(s) of result in rich-text.

Parameters:

key -- str: (Optional) Keyword of printing. Valid keywords are 'misprime', 'warning', 'primer', 'assembly'; case insensitive. When nonspecified, result of all keywords is returned.

Returns:

str

Raises:
  • AttributeError -- For illegal key.
  • UnboundLocalError -- When is_success = False.
get(key)

Get result parameters.

Parameters:key -- str: Keyword of parameter. Valid keywords are 'MIN_TM', 'NUM_PRIMERS', 'MIN_LENGTH', 'MAX_LENGTH', 'COL_SIZE', 'WARN_CUTOFF', 'WARNING', 'PRIMER', 'MISPRIME'; case insensitive.
Returns:value of specified key.
Raises:AttributeError -- For illegal key.
save(path='./', name=None)

Save result to text file.

Parameters:
  • path -- str: (Optional) Path for file saving. Use either relative or absolute path.
  • name -- str: (Optional) Prefix/name for file name. When nonspecified, current object's name is used.

Built with Sphinx using a RiboKit Theme . Hosted on GitHub Pages.

© Copyright 2008-2017 The Board of Trustees of the Leland Stanford Junior University. All Rights Reserved.

Last updated on Jun 22, 2017.