\n\n.. image:: https://travis-ci.org/Edinburgh-Genome-Foundry/Caravagene.svg?branch=master\n :target: https://travis-ci.org/Edinburgh-Genome-Foundry/lala\n :alt: Travis CI build status\n\n.. image:: https://coveralls.io/repos/github/Edinburgh-Genome-Foundry/Caravagene/badge.svg?branch=master\n :target: https://coveralls.io/github/Edinburgh-Genome-Foundry/Caravagene?branch=master\n\n\nCaravagene (full documentation `here `_) is a Python library to plot schemas of DNA constructs from a list of parts:\n\n.. code:: python\n\n from caravagene import Part, Construct, ConstructList\n\n constructs = ConstructList([Construct([\n Part('promoter', label='my promoter'),\n Part('CDS', label='gene with a very very long name'),\n Part('terminator', label='PolyA'),\n Part('insulator', label='I1')\n ])])\n\n constructs.to_image('construct.jpeg')\n\n.. raw:: html\n\n
\n \n
\n\nHere is another example producing `this PDF `_\nshowing multiple constructs:\n\n.. code:: python\n\n from caravagene import Part, Construct, ConstructList\n\n my_constructs = ConstructList(\n title=\"My constructs\",\n constructs=[\n Construct(name=\"ASM1\", parts=[\n Part('HA1', category='homology-arm'),\n Part('rc1', category='recombinase-recognition-sequence'),\n Part('my promoter', category='promoter'),\n Part('RNA stability', category='rna-stability-sequence'),\n Part('acs', category='CDS'),\n Part('PolyA', category='terminator'),\n Part('I1', category='insulator'),\n ]),\n Construct(name=\"ASM2\", parts=[\n Part('my promoter', category='promoter'),\n Part('gene with a very very long name', category='CDS'),\n Part('PolyA', category='terminator'),\n Part('I1', category='insulator')\n ])\n ]\n )\n my_constructs.to_pdf('multiconstruct.pdf')\n\n.. raw:: html\n\n
\n \n
\n\nNote that ``ConstructsList`` can be supplied with a fontthat it is also possible to extend Caravagene to support other categories/symbols, as follows:\n\n.. code:: python\n\n from caravagene import SYMBOL_FILES\n SYMBOL_FILES['my-new-category'] = 'path/to/some/symbol.svg'\n\nFinally, here is an example using an Excel spreadsheet:\n\n**Spreadsheet:**\n\n.. raw:: html\n\n
\n \n
\n\n**Python code:**\n\n.. code:: python\n\n from caravagene import ConstructList\n my_constructs = ConstructList(\"my_spreadsheet.xlsx\")\n my_constructs.to_pdf('my_schemas.pdf')\n\nor **command-line (one-time use):**\n\n.. code:: shell\n\n caravagene my_spreadsheet.xlsx my_schemas.pdf\n\nor **command-line (re-render when the spreadsheet changes on disk):**\n\n.. code:: shell\n\n caravagene my_spreadsheet.xlsx my_schemas.pdf --watch\n\n**Output:**\n\n\n.. raw:: html\n\n