Skip to main content

Terrarium

PyPI version

Terrarium is a dynamic computer-aided process planner (CAPP) for biology designed for agile manufacturing of biological products, such as E Coli & Yeast strains, or Mammalian cell lines.

This piece of software automatically plans scientific experiments in Aquarium using historical planning data and current laboratory inventory. Data can be pulled from specific researchers to emulate how that particular researcher would plan experiments.

Requirements

  • development version of trident (v0.1.0)
  • Python >= 3.6
  • Aquarium login credentials

Usage

Installing a specific version

pip install terrarium-capp==0.1.5

New models can be built as in the following:

from pydent import AqSession
from terrarium import AutoPlannerModel
production = AqSession("login", "pass", "url")

# pull last 300 experimental to build model
model = AutoPlannerModel(production, depth=300)
model.build()
models.save('terrarium.pkl')

Saved models can be open later:

model = AutoPlannerModel.load('terrarium.pkl')

What protocols the model uses can be adjusted using filters:

ignore_ots = production.OperationType.where({"category": ["Control Blocks", "Library Cloning"], "deployed": True})
ignore_ots += production.OperationType.where({"name": "Yeast Mating"})
ignore_ots += production.OperationType.where({"name": "Yeast Auxotrophic Plate Mating"})
ignore = [ot.id for ot in ignore_ots]
model.add_model_filter("AllowableFieldType", lambda m: m.field_type.parent_id in ignore)

Sample composition:

sample_composition = nx.DiGraph()

# build a new yeast strain from a plasmid, which is comprised of several fragments
edges = [
     ('DTBA_backboneA_splitAMP', 'pyMOD-URA-URA3.A.1-pGPD-yeVenus-tCYC1'),
     ('T1MC_NatMX-Cassette_MCT2 (JV)', 'pyMOD-URA-URA3.A.1-pGPD-yeVenus-tCYC1'),
     ('BBUT_URA3.A.0_homology1_UTP1 (from genome)', 'pyMOD-URA-URA3.A.1-pGPD-yeVenus-tCYC1'),
     ('DH5alpha', 'pyMOD-URA-URA3.A.1-pGPD-yeVenus-tCYC1'),
     ('TP-IRES-EGFP-TS', 'pyMOD-URA-URA3.A.1-pGPD-yeVenus-tCYC1' ),
     ('pyMOD-URA-URA3.A.1-pGPD-yeVenus-tCYC1', 'CEN.PK2 - MAT alpha | his-pGRR-W5-W8-RGR-W36'),
]

for n1, n2 in edges:
    s1 = browser.find_by_name(n1)
    s2 = browser.find_by_name(n2)
    sample_composition.add_node(s1.id, sample=s1)
    sample_composition.add_node(s2.id, sample=s2)
    sample_composition.add_edge(s1.id, s2.id)
ignore_items = []  # optional to not include certain items in the search.
desired_object_type = production.ObjectType.find_by_name('Fragment Stock')
cost, paths, graph = network.run(desired_object_type, ignore=ignore_items)
# make a new plan
canvas = Planner(production)

# add protocols from optimized network to plan
network.plan(paths, graph, canvas)

# submit to Aquarium
canvas.create()

Example of Planning Yeast Construction

plan_example

Probability Matrix of Connecting Aquarium Protocols

The autoplanner uses this type of data, in concert with the sample_composition network, to build an optimal experiment.

all_connections

Top 50 Connections

top_50_connections

Model Factory

factory = ModelFactory(session)

# make a model from a single user
model1 = factory.emulate('user1').build()

# make a model from a group of users
user_group = ['user2', 'user3']
model2 = factory.emulate(user_group).build()

# make a model from the last 100 plans
model3 = factory.new(100).build()

# compose a weighted model
model = model1 + model2 * 3

Future Version

  • estimate convidence for certain inventory items or operations based on past success rate
  • better api for
  • using 'ghost' plans to build model
  • emulating specific users / user groups ** faster execution (currently ~45-60 seconds)

License

Feb. 4, 2019 - This software is not currently licensed. The author (Justin D. Vrana of University of Washington) does not grant permission to copy or modify code base.

Metadata

Release files for terrarium-capp 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for terrarium-capp 0.1.6
File Size Uploaded
terrarium-capp-0.1.6.tar.gz 31.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for terrarium-capp 0.1.6
File Interpreter ABI Platform
terrarium_capp-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 64.8 kB

Release files / terrarium-capp-0.1.6.tar.gz

Download URL terrarium-capp-0.1.6.tar.gz
Size 31.4 kB
Tags Source
SHA-256 checksum
How to use checksums
016824f32a8e9c6ea63e91afa7325e95bc5efda04fa1794f19d463c65157653f
BLAKE2b-256 checksum
How to use checksums
29b33cf967099aa103a19fd0ee24f0aba8724e1d438a8371e307287ce8c5b70e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.17 CPython/3.7.4 Darwin/18.6.0

Release files / terrarium_capp-0.1.6-py3-none-any.whl

Download URL terrarium_capp-0.1.6-py3-none-any.whl
Size 33.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
19f898266298beb06e725ca2dae6887c09b71a3ca58f4ab9e8d35e143771d65d
BLAKE2b-256 checksum
How to use checksums
d368c64b307bc621bcb957cf371b13bbf4f2cef085b353751cd6ed2dde100d05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.17 CPython/3.7.4 Darwin/18.6.0

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page