GithubHelp home page GithubHelp logo

Autoprotocol Python Library

PyPI Version

Build Status

Code Coverage

PyPI - Downloads

Gitter Chat

Autoprotocol is the standard way to express experiments in life science. This repository contains a python library for generating Autoprotocol.

Installation

To work from the latest stable release:

pip install autoprotocol

check the the releases for more information about the changes that will be downloaded.

Alternatively to get more up-to-date features:

git clone https://github.com/autoprotocol/autoprotocol-python
cd autoprotocol-python
python setup.py install

check the changelog for information about features included on master but not yet released.

Building a Protocol

A basic protocol is written by declaring Protocol.ref objects and acting on them with Protocol.instruction methods.

import json
from autoprotocol.protocol import Protocol

# instantiate a protocol object
p = Protocol()

# generate a ref
# specify where it comes from and how it should be handled when the Protocol is done
plate = p.ref("test pcr plate", id=None, cont_type="96-pcr", discard=True)

# generate seal and spin instructions that act on the ref
# some parameters are explicitly specified and others are left to vendor defaults
p.seal(
    ref=plate,
    type="foil",
    mode="thermal",
    temperature="165:celsius",
    duration="1.5:seconds"
)
p.spin(
    ref=plate,
    acceleration="1000:g",
    duration="1:minute"
)

# serialize the protocol as Autoprotocol JSON
print(json.dumps(p.as_dict(), indent=2))

which prints

{
  "instructions": [
    {
      "op": "seal",
      "object": "test pcr plate",
      "type": "foil",
      "mode": "thermal",
      "mode_params": {
        "temperature": "165:celsius",
        "duration": "1.5:second"
      }
    },
    {
      "op": "spin",
      "object": "test pcr plate",
      "acceleration": "1000:g",
      "duration": "1:minute"
    }
  ],
  "refs": {
    "test pcr plate": {
      "new": "96-pcr",
      "discard": true
    }
  }
}

Extras

Select SublimeText snippets are included with this repository. To use them copy the autoprotocol-python SublimeText Snippet folder to your local Sublime /Packages/User directory.

Documentation

For more information, see the documentation.

Contributing

For more information, see CONTRIBUTING.

Autoprotocol's Projects

Autoprotocol doesnโ€™t have any public repositories yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.