Coder Social home page Coder Social logo

antha's Introduction

Antha

GoDoc Build Status

Antha v0.5

Contents:

  • Installation Instructions
    • OSX (Native)
    • Linux (Native)
    • Windows (Native)
  • Checking Your Installation
  • Making and Running Antha Elements
  • Adding Custom Equipment Drivers
    • List of Supported Interfaces
    • Connecting the Driver to Antha
  • Demo

Installation Instructions

Antha is divided into the core language and tools in this repo and protocols and elements which are in antha-lang/elements. Instructions for using both are stored here.

OSX (Native)

First step is to install or upgrade to the latest version of Go. Follow the instructions at the Golang site.

Update the GOPATH:

export GOPATH=$HOME/go >> $HOME/.bash_profile
export PATH=$PATH:$HOME/go/bin >> $HOME/.bash_profile
source ~/.bash_profile

After you install go, if you don't have Homebrew, please install it. Then, follow these steps to setup a working antha development environment:

# Install the xcode developer tools
xcode-select --install

# Install some external dependencies
brew update
brew install mercurial pkg-config glpk

# Install antha
mkdir -p ${GOPATH:-$HOME/go}/src/github.com/antha-lang
cd ${GOPATH:-$HOME/go}/src/github.com/antha-lang
git clone https://github.com/antha-lang/elements
cd elements
git submodule update --init
make

Linux (Native)

Depending on your Linux distribution, you may not have the most recent version of go available from your distribution's package repository. We recommend you download go directly.

For Debian-based distributions like Ubuntu on x86_64 machines, the installation instructions follow. If you do not use a Debian based system or if you are not using an x86_64 machine, you will have to modify these instructions by replacing the go binary with one that corresponds to your platform and replacing apt-get with your package manager.

Head to https://golang.org/dl/ to download the latest version of go.

The example below assumes this is version go1.10

# Install your downloaded version of go
sudo tar -C /usr/local -xzf go1.10.3.linux-amd64.tar.gz

# Add /usr/local/go/bin to the path
export PATH=$PATH:/usr/local/go/bin

# Install antha external dependencies
sudo apt-get install -y libglpk-dev git

# Install antha
mkdir -p $GOPATH/src/github.com/antha-lang
cd $GOPATH/src/github.com/antha-lang
git clone https://github.com/antha-lang/elements
cd elements
git submodule update --init
make

# add the local go bin to the path
export PATH=$PATH:$HOME/go/bin

Windows (Native)

Installing antha on Windows is significantly more involved than for OSX or Linux. The basic steps are:

  • Setup a go development environment:
    • Install the source code manager git
    • Install go
    • Install the compiler mingw. Depending on whether you installed the 386 (32-bit) or amd64 (64-bit) version of go, you need to install the corresponding version of mingw.
  • Download antha external dependencies
    • Install glpk development library and make sure that mingw can find it.

If this procedure sounds daunting, you can try using some scripts we developed to automate the installation procedure on Windows. Download, unzip them and run install.bat. This will try to automatically apply the Windows installation procedure with the default options. Caveat emptor.

Checking Your Installation

After following the installation instructions for your machine. You can check if Antha is working properly by running a test protocol

cd $HOME/go/src/github.com/antha-lang/elements/an/AnthaAcademy/Lesson1_Commands/Lesson1G_SampleForTotalVolume
antha run --bundle Lesson1_SampleForTotalVolume.bundle.json

Making and Running Antha Elements

The easiest way to start developing your own antha elements is to place them in the $HOME/go/src/github.com/antha-lang/elements/an directory and follow the structure of the existing elements there. Afterwards, you can compile and use your elements with the following commands: Compile:

make -C $HOME/go/src/github.com/antha-lang/elements

Run:

antha run --bundle workflow-and-parameters.json

You can also make elements stored elsewhere by adding AN_DIRS=<your-directory-here> e.g...

make -C $HOME/go/src/github.com/antha-lang/elements AN_DIRS=$HOME/Documents

See https://github.com/antha-lang/elements for instructions on how to set up an alias to compile the Antha elements.

Adding Custom Equipment Drivers

In order to write a custom driver for a piece of equipment and use it with Antha, you would need:

  1. Find out what device interfaces does Antha currently support (see the list below)
  2. Implementing the driver against that gRPC interface
  3. Connect the driver to Antha.

List of Supported Interfaces

This list could be interpreted as a list of device functions that this version of Antha can automate.

Connecting the Driver to Antha

Connecting the driver is as simple as running antharun with a flag --driver [driver_tcp_port]. It could look like this:

antha run --workflow wf.json --parameters params.json --driver localhost:50051

More instructions can be found here:

antha's People

Contributors

aliacarmen avatar cachemoi avatar charlotteward avatar chr1sgrant avatar cosmonautspiff avatar ddn0 avatar etiene avatar haydnking avatar hlmgreen avatar jake-ccl avatar jarpinosynthace avatar jmanart avatar johansglock avatar josi-asae avatar levitskovich avatar m-i-sadowski avatar mcouch-synthace avatar mkoch13 avatar n-scholes avatar qutebits avatar sarahbryan avatar shama-engd avatar st3v3b avatar twoodwark avatar x-anderson avatar

Stargazers

 avatar

Watchers

 avatar

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.