Bioprinter Documentation

_images/title.png

Bioprinter is a Python package for producing living art. It transforms an image into files that a liquid dispenser can use to print the image to a plate using pigmented yeast or bacteria.

Here are two examples of bio-art:

_images/bioprint_dolly.jpeg

Dolly drawn with baker yeast (white), violacein-producing yeast (black), and carotene-producing yeast (orange).

_images/bioprint_england.jpeg

England flag drawn with 3 different strains of the bacterium E. coli.

Bioprinter is released on Github under the MIT licence (Copyright 2015 Edinburgh Genome Foundry), everyone is welcome to contribute!

Bioprinter was written at the Edinburgh Genome Foundry by Zulko after an original idea and Matlab code by Mike Shen at the Boeke Lab (project on Github).

Installation

If you have PIP installed:

(sudo) pip install ez_setup bioprinter

Or unzip the source code in a directory and type in a terminal:

sudo python setup.py install

Usage

The image file to be printed can have any resolution, but note that the width/height ratio of the plate the image is printed on is 1.5. Ensure that a specific color is used to mark the un-pigmented background of the image, here we use blue:

_images/dolly.jpeg

Run the following code in Python or save in dolly.py:

from bioprinter import bioprint

bioprint(
    image_filename="/path/to/image/dolly.jpeg",
    output_filename="dolly.csv",
    bg_color=[0, 0, 255],  # blue background represents empty wells
    pigments_wells={"A1": [0, 0, 0],        # black yeast in source well A1
                    "A2": [250, 120, 10],   # orange yeast in well A2
                    "A3": [255, 255, 255]}, # white yeast in well A3
    quantified_image_filename="dolly_preview.jpeg"
)

The saved script can be executed in a terminal with python dolly.py. This will produce a dolly.csv file as well as a preview image of the final printing (so that you can check if the image looks good at this low resolution).

_images/dolly_preview.png

Prepare a source plate with the right pigmented yeasts in wells A1, A2, A3, use an agar plate as the destination plate, and feed dolly.csv to the Labcyte Echo. Once the printing is finished, incubate 2 days at 30C (it would be one day at 37C for bacteria). Enjoy the result!

Reference manual

bioprinter.bioprint(image_filename, output_filename, bg_color, pigments_wells, resolution=192, 128, transfer_volume=2.5, pigment_well_capacity=25000, transfer_rate=150, quantified_image_filename=None)[source]

Generate a CSV that can be used in the Echo to print the given picture.

Parameters
image_filename

The path the image file to be printed. Can be virtually any size and file format, but make sure the image is well adapted to low resolution yeast printing. If the picture is higher than wide it will be automatically rotated 90 degrees so as to maximize its resolution on the plate (the image aspect ratio is conserved).

output_filename

The name of the CSV file written by the function, that will then be fed to the Echo.

bg_color

A triplet (R,G,B) of 0-255 integers indicating which color of the original image represents the background (no pigment)

pigments_wells

A dictionary of well names and the corresponding pigments. For instance {“A1”: [0,10,20], “B1”:…}. Only one well per pigment is currently supported.

resolution

Resolution (width, height) of the printing plate. You must define a plate with these exact same characteristics using the Echo software. Default is (192, 128) (twice the resolution of a 1536-well plate). The aspect ratio of the original image is always automatically conserved.

transfer_volume

How many microliters of liquid should be used for each pixel. The default, 2.5, works very well and is also the lowest possible value on our Echo.

pigment_well_capacity

Volume in microliters that one pigment well can dispense. The function raises an error if the total number of pixels for one color exceeds the content of one pigment well, i.e. if

transfer_volume * number_pixels > well_capacity

transfer_rate

Average number of droplet transfers per second, used only to give an estimate of the time required for printing.

quantified_image_filename

If a path is provided, the quantified picture will be saved as an image file under this name.