Caravagene Reference manual¶
-
class
caravagene.
Part
(category, label='', sublabel='', subscript='', reversed=False, bg_color='none')[source]¶ Represent a genetic part.
- Parameters
- category
Either ‘promoter’, ‘CDS’… Defines the symbol displayed for this part.
- label
String that will be displayed on top of the part.
- sublabel
Note that will be written in grey below the label.
- subscript
Note that will be written below the part.
- reversed
True/False. Whether the part is in direct or indirect sense.
- bg_color
String representing any html color, which will be used as background to highlight this part.
-
static
from_dict
(part_dict)[source]¶ Create a part from a dictionary.
This is intended for Schema imports from JSON in web applications. This dictionary should have the same parameters as the __init__ function (other parameters will be ignored).
-
property
style
¶ Define the CSS style from the part’s parameters.
-
class
caravagene.
Construct
(parts, name='', note='')[source]¶ Represent a genetic construct with several parts.
- Parameters
- parts
A list of Parts, in the order in which they appear in the construct. Alternatively, a pandas dataframe can be provided, with columns ‘label’, ‘category’, ‘sublabel’, ‘subscript’, ‘style’. The last column, ‘style’ can be for instance “bg:green bold”.
- name
Name of the construct. Will be displayed on top of the construct’s plot.
- note
Some text that will be displayed between the construct’s name and plot.
-
class
caravagene.
ConstructList
(constructs, title='auto', note='', size=13, font='Helvetica', orientation='portrait', width=600, page_size='A4', use_google_fonts=False)[source]¶ Represent a genetic construct will several parts.
- Parameters
- constructs
A list of Constructss, in the order in which they appear in the plot. Alternatively, a path to an excel spreadsheet can be provided (see docs for explanations on the spreadsheet format).
- title
Title for this list of constructs. Will be displayed on top of the plots.
- note
Some text that will be displayed between the title and the plots.
- size
Size of the font for labels, which also scales the size of sublabel, subscript, and the symbol itself.
- orientation
‘portrait’ or ‘landscape’. Orientation of the page when exporting to PDF.
- page_size
Page format when exporting to PDF.
- width
Page width when exporting to an image.
- font
Name of the font to use for all texts.
- use_google_fonts
Whether the font should be obtained from Google Fonts (will only work with an Internet access).
-
static
from_dict
(csts_dict)[source]¶ Create a constructs list from a dictionary.
This is intended for Schema imports from JSON in web applications. This dictionary should have the same parameters as the __init__ function (other parameters will be ignored).