execute

package
v0.0.0-...-040724e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2019 License: BSD-3-Clause, GPL-2.0 Imports: 22 Imported by: 4

Documentation

Overview

Package execute connects Antha elements to the trace execution infrastructure.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Errorf

func Errorf(ctx context.Context, format string, args ...interface{})

Errorf reports an execution error. Does not return

func ExecuteMixes

func ExecuteMixes(ctx context.Context, liquids ...*wtype.LHComponent) []*wtype.Liquid

ExecuteMixes will ensure that all mix activities in a workflow prior to this point must be completed before Mix instructions after this point.

func Incubate

func Incubate(ctx context.Context, in *wtype.Liquid, opt IncubateOpt) *wtype.Liquid

Incubate incubates a component

func Issue

func Issue(ctx context.Context, instruction *commandInst)

Issue an instruction - this records the instruction into the trace.

func Mix

func Mix(ctx context.Context, components ...*wtype.Liquid) *wtype.Liquid

Mix mixes components

func MixInto

func MixInto(ctx context.Context, outplate *wtype.Plate, address string, components ...*wtype.Liquid) *wtype.Liquid

MixInto mixes components

func MixNamed

func MixNamed(ctx context.Context, outplatetype, address string, platename string, components ...*wtype.Liquid) *wtype.Liquid

MixNamed mixes components

func MixTo

func MixTo(ctx context.Context, outplatetype, address string, platenum int, components ...*wtype.Liquid) *wtype.Liquid

MixTo mixes components

TODO: Addresses break dependence information. Deprecated.

func MixerPrompt

func MixerPrompt(ctx context.Context, message string, in ...*wtype.Liquid) []*wtype.Liquid

MixerPrompt prompts user with a message during mixer execution

func MixerWait

func MixerWait(ctx context.Context, time wunit.Time, message string, in ...*wtype.Liquid) []*wtype.Liquid

MixerWait prompts user with a message during mixer execution and waits for the specifed time before resuming.

func NewComponent

func NewComponent(ctx context.Context, typ string) *wtype.Liquid

NewComponent returns a new component given a component type

func NewPlate

func NewPlate(ctx context.Context, typ string) *wtype.Plate

NewPlate returns a new plate given a plate type

func PlateRead

func PlateRead(ctx context.Context, opt PlateReadOpts) *wtype.Liquid

PlateRead reads absorbance of a component

func Prompt

func Prompt(ctx context.Context, in *wtype.Liquid, message string) *wtype.Liquid

Prompt prompts user with a message

func RunQPCRExperiment

func RunQPCRExperiment(ctx context.Context, opt QPCROptions) []*wtype.Liquid

RunQPCRExperiment starts a new QPCR experiment, using an experiment input file.

func RunQPCRFromTemplate

func RunQPCRFromTemplate(ctx context.Context, opt QPCROptions) []*wtype.Liquid

RunQPCRFromTemplate starts a new QPCR experiment, using a template input file.

func Sample

func Sample(ctx context.Context, liquid *wtype.Liquid, v wunit.Volume) *wtype.Liquid

Sample takes a sample of volume v from this liquid

func SetInputPlate

func SetInputPlate(ctx context.Context, plate *wtype.Plate)

SetInputPlate Indicate to the scheduler the the contents of the plate is user supplied. This modifies the argument to mark each well as such.

func SplitSample

func SplitSample(ctx context.Context, component *wtype.Liquid, volume wunit.Volume) (removed, remaining *wtype.Liquid)

SplitSample is essentially an inverse mix: takes one component and a volume and returns two the question is then over what happens subsequently.. unlike mix this does not have a destination as it's intrinsically a source operation

func WithElementName

func WithElementName(parent context.Context, name string) context.Context

WithElementName returns a new context that stores the current element name

Types

type Annotatable

type Annotatable interface {
	GetData(key string) ([]byte, error)
	SetData(key string, data []byte) error
}

An Annotatable is an object that can data attached to it

type IncubateOpt

type IncubateOpt struct {
	// Time for which to incubate component
	Time wunit.Time
	// Temperature at which to incubate component
	Temp wunit.Temperature
	// Rate at which to shake incubator (force is device dependent)
	ShakeRate wunit.Rate
	// Radius at which ShakeRate is defined
	ShakeRadius wunit.Length

	// Time for which to pre-heat incubator
	PreTemp wunit.Temperature
	// Temperature at which to pre-heat incubator
	PreTime wunit.Time
	// Rate at which to pre-heat incubator
	PreShakeRate wunit.Rate
	// Radius at which PreShakeRate is defined
	PreShakeRadius wunit.Length
}

An IncubateOpt are options to an incubate command

type Opt

type Opt struct {
	// Target machine configuration
	Target *target.Target
	// Deprecated for separate assignment of values to workflow. Raw workflow.
	Workflow *workflow.Desc
	// Deprecated for separate assignment of values to workflow. Raw parameters.
	Params *RawParams
	// Job ID.
	ID string
	// Deprecated for separate assignment of values to workflow. If true, read
	// content for each wtype.File from file of the same name in the current
	// directory.
	TransitionalReadLocalFiles bool
}

An Opt are options for Run.

type Params

type Params struct {
	Parameters map[string]map[string]interface{} `json:"Parameters"`
	Config     *mixer.Opt                        `json:"Config"`
}

Params is the structure of parameter data for marshalling.

Deprecated for github.com/antha-lang/antha/api/v1/WorkflowParameters.

type PlateReadOpts

type PlateReadOpts struct {
	Sample  *wtype.Liquid
	Options string
}

PlateReadOpts defines plate-reader absorbance options

type QPCROptions

type QPCROptions struct {
	Reactions  []*wtype.Liquid
	Definition string
	Barcode    string
	TagAs      string
}

QPCROptions are the options for a QPCR request.

type RawParams

type RawParams struct {
	Parameters map[string]map[string]json.RawMessage `json:"Parameters"`
	Config     *mixer.Opt                            `json:"Config"`
}

RawParams is the structure of parameter data for unmarshalling.

Deprecated for github.com/antha-lang/antha/api/v1/WorkflowParameters.

type Result

type Result struct {
	Workflow *workflow.Workflow
	Input    []ast.Node
	Insts    []ast.Inst
}

Result of executing a workflow.

func Run

func Run(parent context.Context, opt Opt) (res *Result, err error)

Run is a simple entrypoint for one-shot execution of workflows.

type Trace

type Trace struct {
	// contains filtered or unexported fields
}

func WithTrace

func WithTrace(parent context.Context) (context.Context, *Trace)

func (*Trace) Instructions

func (tr *Trace) Instructions() []*commandInst

Returns a (shallow) copy (to avoid data races) of the issued instructions.

func (*Trace) Issue

func (tr *Trace) Issue(instruction *commandInst)

Issue an instruction - this records the instruction into the trace.

type UserError

type UserError struct {
	// contains filtered or unexported fields
}

An UserError reported by user code

func (UserError) Error

func (err UserError) Error() string

Error satisfies the error interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL