Trident: The Aquarium API

Trident is the Python scripting API for Aquarium , the software that runs the UW BIOFAB. The code is available here. Trident was built by members of the Klavins lab.

Trident is a python scripting API wrapper for Aquarium. With Trident, you may pull down data, submit plans, create samples, and more.

Getting Started

Pydent can be install using pip:

pip3 install pydent --upgrade

To use trident, you’ll need an Aquarium login, password, and url

python
from pydent import AqSession

session = AqSession("user", "password", "http://your.aquarium.url")

sample = session.Sample.find(1)

print(sample)

More Installation Instructions

For more information on installation, checkout the Installation

Using Trident

Below is an example of how to submit a plan. Check Trident Examples for more examples.

# session = AqSession("user", "password", "http://you.aquarium.url")

primer = session.SampleType.find(1).samples[-1]

# get Order Primer operation type
ot = session.OperationType.find(328)

# create an operation
order_primer = ot.instance()

# set io
order_primer.set_output("Primer", sample=primer)
order_primer.set_input("Urgent?", value="no")

# create a new plan
p = models.Plan(name="MyPlan")

# connect the plan to the session
p.connect_to_session(session)

# add the operation to the plan
p.add_operation(order_primer)

# create the plan on the server
p.create()

# changes to plan can be saved (not necessary here)
# p.save()

# estimate the cost
p.estimate_cost()

# validate the plan
p.validate()

# show the plan
# p.show()

# submit the plan
p.submit(session.current_user, session.current_user.budgets[0])

# print("You may open you plan here: {}".format(session.url + "/plans?plan_id={}".format(p.id)))
print("Your plan was successfully submitted!")
Your plan was successfully submitted!

Contributing

To contribute, please checkout Contributing.