PCR Assembly Primer Design
primerize.util_class
Module¶primerize.util_class.
Assembly
(sequence, primers, name, COL_SIZE=142)¶Bases: object
Collection of result data essential for drawing an assembly scheme.
Parameters: |
|
---|
sequence
¶str
: Sequence of assembly design.
primers
¶list(list(int))
: Numeric representation (end numbering and direction) of primers.
name
¶str
: Construct prefix/name.
bp_lines
¶list(str)
: Strings for base-pairing lines ('|'
).
seq_lines
¶list(str)
: Strings for primer sequence lines.
print_lines
¶list(tuple(str, str))
: Strings for all lines assembled, i.e. list(tuple('marker', 'print_line'))
.
Tm_overlaps
¶list(float)
: List of melting temperature for all overlapping regions.
__repr__
()¶Representation of the Assembly
class.
__str__
()¶Results of the Assembly
class. Calls echo()
.
echo
()¶Print result in rich-text.
Returns: | str |
---|
save
(path='./', name=None)¶Save result to text file.
Parameters: |
|
---|
primerize.util_class.
Construct_List
¶Bases: object
Collection of mutant constructs. An empty isntance of primerize.Mutation
is always initiated as the first element, i.e. a Wild-type well as the first of list.
_data
¶Data of constructs, in format of list(primerize.Mutation)
.
__contains__
(mut_list)¶Test if a list of given mutant construct is present.
Parameters: | mut_list -- primerize.Mutation : A mutant represented by primerize.Mutation . |
---|---|
Returns: | bool |
__iter__
()¶Iterator through all constructs.
__len__
()¶Number of filled wells.
Returns: | int |
---|
__repr__
()¶Representation of the Construct_List
class.
__str__
()¶Results of the Construct_List
class. Calls echo()
.
echo
(prefix='')¶Print result in rich-text.
Returns: | str |
---|
list
()¶Return a list of all constructs.
Returns: | list(list(str)) |
---|
merge
(other)¶Merge 2 lists of constructs.
Parameters: | other -- primerize.Construct_List : Another list of constructs. |
---|---|
Returns: | primerize.Construct_List -- A list of duplicated constructs between inputs. |
Raises: | TypeError -- For illegal other. |
pop
(mut_list)¶Remove a list of mutations.
Parameters: | mut_list -- primerize.Mutation : A mutant represented by primerize.Mutation . Mutant that is not present will result in a premature return with False . |
---|---|
Returns: | bool -- Whether mut_list is successfully removed. |
push
(mut_list)¶Add a list of mutations.
Parameters: | mut_list -- primerize.Mutation : Mutations. A mutant represented by primerize.Mutation . If the mutant is already present, it will return False . |
---|---|
Returns: | bool -- Whether mut_list is successfully added. |
primerize.util_class.
Mutation
(mut_str=[])¶Bases: object
Collection of mutations for a construct.
Parameters: | mut_list -- list(str) : (Optional) List of mutations. When nonspecified, an empty instance is created; when specified, it calls push() . An empty instance means no mutations, i.e. Wild-type. |
---|
_data
¶Data of mutations, in format of dict: { int: tuple(str, str) }
, i.e. dict: {'seqpos': ('wt_char', 'mut_char') }
.
__contains__
(mut_str)¶Test if a list of given mutation is present.
Parameters: | mut_list -- list(str) : Mutations in format of 'wt_char' , 'seq_pos' , 'mut_char' , (e.g. ['G13C', 'A15T'] ). |
---|---|
Returns: | bool |
__eq__
(other)¶Comparison method for whether two Mutation
objects contain the same set of mutations.
__iter__
()¶Iterator through all mutations.
__len__
()¶Number of filled wells.
Returns: | int |
---|
__repr__
()¶Representation of the Mutation
class.
__str__
()¶Results of the Mutation
class. Calls echo()
.
echo
()¶Print result in rich-text, delimited by ';'
.
Returns: | str |
---|
list
()¶Return a list of all mutations.
Returns: | list(str) |
---|
merge
(other)¶Merge 2 lists of mutations.
Parameters: | other -- primerize.Mutation : Another list of mutations. |
---|---|
Raises: | TypeError -- For illegal other. |
pop
(mut_str)¶Remove a list of mutations.
Parameters: | mut_list -- list(str) : Mutations. Valid keywords are the same as has() . Mutations that are not present will result in a premature return with False . |
---|---|
Returns: | bool -- Whether all mutations in mut_list are successfully removed. |
push
(mut_str)¶Add a list of mutations.
Parameters: | mut_list -- list(str) : Mutations. Valid keywords are the same as has() . Each 'seq_pos' can only be mutated once. Conflicting mutations are overwritten and the most recent one is saved. 'WT' is ignored. |
---|---|
Raises: | ValueError -- For illegal mut_str. |
primerize.util_class.
Plate_96Well
(tag=1)¶Bases: object
Abstraction of 96-well plates.
Parameters: | tag -- int : (Optional) Mutation library tag. Use which_lib number. |
---|
coords
¶set(str)
: Filled 96-Well Coordinates.
_data
¶Data of primers and names, in format of dict: { str: tuple(primerize.Mutation, str) }
, i.e. dict: {'coord': ('tag', 'primer') }
.
__contains__
(coord)¶Test if data of a given WellPosition is present.
Parameters: | coord -- str : WellPosition (e.g. 'A01' ) for data. |
---|---|
Returns: | bool |
__len__
()¶Number of filled wells.
Returns: | int |
---|
__repr__
()¶Representation of the Plate_96Well
class.
__str__
()¶Results of the Plate_96Well
class. Calls echo()
.
echo
(ref_primer='')¶Print result in rich-text.
Parameters: | ref_primer -- list(str) : (Optional) List of Wild-type primer_set for highlighting. If nonspecified, highlighting is disabled. |
---|---|
Returns: | str |
get
(coord)¶Get data of a particular well or number of wells filled.
Parameters: | coord -- |
---|---|
Returns: | value of specified coord. |
Raises: |
|
reset
()¶Clear current plate data.
save
(ref_primer='', file_name='./plate.svg', title='')¶Save plate layout to image file (SVG).
Parameters: |
|
---|
set
(coord, tag, primer)¶Record data of a particular well.
Parameters: |
|
---|---|
Raises: |
|
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.