synbiopython.genbabel.simplednaplot¶
Synbiopython (c) Global BioFoundry Alliance 2020
Synbiopython is licensed under the MIT License.
This module is to implement the simple plotting of the gene circuit using the modified code from quickplot.py in DNAplotlib library # added quickplot style for writing Regulations. # added new Regulation type: Derepression
- Reference:
- Install:
pip install dnaplotlib
-
class
synbiopython.genbabel.simplednaplot.SimpleDNAplot.
SimpleDNAplot
[source]¶ Bases:
object
Class to generate SBOL visual compliant gene circuit diagram. Regulation type: Connection, Activation, Repression, Derepression Each of the part will be numbered sequentially based on the part type/module from left to right starting from index 0. Example: p0-r0-c0-t0-p1-r1-c1-t1 for two modules with promoter, RBS, coding region, and terminator. Input = “p.pTet r.rbs34 c.orange.LacI t p.pLac r.rbs32 c.green.TetR t” Regulations = “c0->p1.Repression c1->p0.Repression” # The default color is black if color is not specified
-
static
compute_dnalength
(part, part_length)[source]¶ Calculate the position for the to_part or from_part for plotting arrows automatically.
- Parameters
part (str) – the to_part or from_part
part_length (list of str) – all the parts with sequential numbering starting from 0
- Returns
dna length
- Return type
float
-
plot_circuit
(Input, Regulation=None, savefig=None)[source]¶ Plot the SBOL-compliant gene circuit figure.
- Parameters
Input (str) – Input design from users
Regulation (str) – Regulation strings from users
savefig (str, optional) – path to store the output figure
- Returns
max dna design length and export the gene circuit figure
- Return type
float
-
set_circuit_design
(Input, Regulation=None)[source]¶ Generate the dictionary list containing circuit design information.
- Parameters
Input (str) – a string containing the individual type of part, followed by color and name separated by a space.
Regulation (str, optional) – a string containing the from_part to the to_part connected by an arrow. Type of interaction is specified after the topart followed by the color. Default color of black is used is not specified.
- Returns
The part information and Regulations stored in the form of list of dictionaries.
- Return type
list of dict
-
static