liquidhandling

package
v0.0.0-...-a011eca Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2022 License: BSD-3-Clause, GPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TFR = NewInstructionType("TFR", "Transfer")
	TFB = NewInstructionType("TFB", "TransferBlock")
	CBI = NewInstructionType("CBI", "ChannelBlock")
	CTI = NewInstructionType("CTI", "ChannelTransfer")
	CCC = NewInstructionType("CCC", "ChangeChannelCharacteristics")
	LDT = NewInstructionType("LDT", "LoadTipsMove")
	UDT = NewInstructionType("UDT", "UnloadTipsMove")
	RST = NewInstructionType("RST", "Reset")
	CHA = NewInstructionType("CHA", "ChangeAdaptor")
	ASP = NewInstructionType("ASP", "Aspirate")
	DSP = NewInstructionType("DSP", "Dispense")
	BLO = NewInstructionType("BLO", "Blowout")
	PTZ = NewInstructionType("PTZ", "ResetPistons")
	MOV = NewInstructionType("MOV", "Move")
	MRW = NewInstructionType("MRW", "MoveRaw")
	LOD = NewInstructionType("LOD", "LoadTips")
	ULD = NewInstructionType("ULD", "UnloadTips")
	SUK = NewInstructionType("SUK", "Suck")
	BLW = NewInstructionType("BLW", "Blow")
	SPS = NewInstructionType("SPS", "SetPipetteSpeed")
	SDS = NewInstructionType("SDS", "SetDriveSpeed")
	INI = NewInstructionType("INI", "Initialize")
	FIN = NewInstructionType("FIN", "Finalize")
	WAI = NewInstructionType("WAI", "Wait")
	LON = NewInstructionType("LON", "LightsOn")
	LOF = NewInstructionType("LOF", "LightsOff")
	OPN = NewInstructionType("OPN", "Open")
	CLS = NewInstructionType("CLS", "Close")
	LAD = NewInstructionType("LAD", "LoadAdaptor")
	UAD = NewInstructionType("UAD", "UnloadAdaptor")
	MMX = NewInstructionType("MMX", "MoveMix")
	MIX = NewInstructionType("MIX", "Mix")
	MSG = NewInstructionType("MSG", "Message")
	MAS = NewInstructionType("MAS", "MoveAspirate")
	MDS = NewInstructionType("MDS", "MoveDispense")
	MVM = NewInstructionType("MVM", "MoveMix")
	MBL = NewInstructionType("MBL", "MoveBlowout")
	RAP = NewInstructionType("RAP", "RemoveAllPlates")
	APT = NewInstructionType("APT", "AddPlateTo")
	SPB = NewInstructionType("SPB", "SplitBlock")
)
View Source
var (
	// ErrNoMatchingRules is returned when no matching LHPolicyRules are found when evaluating a rule set against a RobotInsturction.
	ErrNoMatchingRules = errors.New("no matching rules found")
	// ErrNoLiquidType is returned when no liquid policy is found.
	ErrNoLiquidType = errors.New("no LiquidType in instruction")
)

Functions

func ChooseChannel

func ChooseChannel(vol wunit.Volume, prms *LHProperties) (*wtype.LHChannelParameter, *wtype.LHTip, error)

func ChooseChannels

func ChooseChannels(vols []wunit.Volume, prms *LHProperties) ([]*wtype.LHChannelParameter, []*wtype.LHTip, []string, error)

func CompareInstructionSets

func CompareInstructionSets(setA, setB []RobotInstruction, comparators ...RobotInstructionComparatorFunc) utils.ErrorSlice

CompareInstructionSets will use the comparators to detect differences between setA and setB. This allows you to compare, using any arbitrary property, instructions of the same type. The comparison is between the minimum length of setA and setB - an unmatched suffix will cause an error but will not be passed to any comparator.

func GetDefaultPolicy

func GetDefaultPolicy(lhpr *wtype.LHPolicyRuleSet, ins RobotInstruction) (wtype.LHPolicy, error)

GetDefaultPolicy currently returns the default policy this REALLY should not be necessary... ever

func GetMultiSet

func GetMultiSet(a []string, channelmulti int, fromplatemulti int, toplatemulti int) [][]int

func GetNextSet

func GetNextSet(a []string, channelmulti int, fromplatemulti int, toplatemulti int) ([]int, []string)

func GetPolicyFor

func GetPolicyFor(lhpr *wtype.LHPolicyRuleSet, ins RobotInstruction) (wtype.LHPolicy, error)

GetPolicyFor will return a matching LHPolicy for a RobotInstruction. If a common policy cannot be found for instances of the instruction then an error will be returned.

func InsToString

func InsToString(ins RobotInstruction) string

func IsIn

func IsIn(i int, a []int) bool

func MinMinVol

func MinMinVol(channels []*wtype.LHChannelParameter) wunit.Volume

func SafeGetBool

func SafeGetBool(m map[string]interface{}, key string) bool

func SafeGetF64

func SafeGetF64(m map[string]interface{}, key string) float64

func SafeGetInt

func SafeGetInt(m map[string]interface{}, key string) int

func SafeGetString

func SafeGetString(m map[string]interface{}, key string) string

func SafeGetVolume

func SafeGetVolume(m map[string]interface{}, key string) wunit.Volume

func TipChosenError

func TipChosenError(v wunit.Volume, prms *LHProperties) error

func TransferVolumes

func TransferVolumes(Vol, Min, Max wunit.Volume) ([]wunit.Volume, error)

TransferVolumes returns a slice of volumes V such that Min <= v <= Max and sum(V) = Vol

Types

type AddPlateToInstruction

type AddPlateToInstruction struct {
	BaseRobotInstruction
	*InstructionType
	Position string
	Name     string
	Plate    interface{}
}

func NewAddPlateToInstruction

func NewAddPlateToInstruction(position, name string, plate interface{}) *AddPlateToInstruction

func (*AddPlateToInstruction) Check

func (apti *AddPlateToInstruction) Check(lhpr wtype.LHPolicyRule) bool

func (*AddPlateToInstruction) Generate

func (*AddPlateToInstruction) GetParameter

func (apti *AddPlateToInstruction) GetParameter(name InstructionParameter) interface{}

func (*AddPlateToInstruction) OutputTo

func (apti *AddPlateToInstruction) OutputTo(drv LiquidhandlingDriver) error

func (*AddPlateToInstruction) Visit

func (ins *AddPlateToInstruction) Visit(visitor RobotInstructionVisitor)

type Addresses

type Addresses []string

Addresses an ordered list of names of positions within a liquidhandling device, as defined by the plugin for that device

func (Addresses) Dup

func (a Addresses) Dup() Addresses

Dup return a copy of the list of addresses

func (Addresses) Map

func (a Addresses) Map() map[string]bool

Map returns a set containing the addresses

func (Addresses) String

func (a Addresses) String() string

String list the addresses wrapped in inverted commas

type AspirateInstruction

type AspirateInstruction struct {
	BaseRobotInstruction
	*InstructionType
	Head       int
	Volume     []wunit.Volume
	Overstroke bool
	Multi      int
	Plt        []string
	What       []string
	LLF        []bool
	Platform   string
	Component  []string
}

func NewAspirateInstruction

func NewAspirateInstruction() *AspirateInstruction

func (*AspirateInstruction) Generate

func (*AspirateInstruction) GetParameter

func (ins *AspirateInstruction) GetParameter(name InstructionParameter) interface{}

func (*AspirateInstruction) OutputTo

func (ins *AspirateInstruction) OutputTo(lhdriver LiquidhandlingDriver) error

func (*AspirateInstruction) Visit

func (ins *AspirateInstruction) Visit(visitor RobotInstructionVisitor)

type BaseRobotInstruction

type BaseRobotInstruction struct {
	Ins RobotInstruction `json:"-"`
}

func NewBaseRobotInstruction

func NewBaseRobotInstruction(ins RobotInstruction) BaseRobotInstruction

func (BaseRobotInstruction) Check

func (bri BaseRobotInstruction) Check(rule wtype.LHPolicyRule) bool

func (BaseRobotInstruction) GetParameter

func (bri BaseRobotInstruction) GetParameter(p InstructionParameter) interface{}

fall-through implementation to simplify instructions that have no parameters

func (BaseRobotInstruction) MaybeMerge

type BlowInstruction

type BlowInstruction struct {
	BaseRobotInstruction
	*InstructionType
	Head       int
	What       []string
	PltTo      []string
	WellTo     []string
	Volume     []wunit.Volume
	TPlateType []string
	TVolume    []wunit.Volume
	Prms       *wtype.LHChannelParameter
	Multi      int
	TipType    string
	Component  []string
}

func NewBlowInstruction

func NewBlowInstruction(cti *ChannelTransferInstruction) *BlowInstruction

func (*BlowInstruction) Generate

func (ins *BlowInstruction) Generate(ctx context.Context, policy *wtype.LHPolicyRuleSet, prms *LHProperties) ([]RobotInstruction, error)

func (*BlowInstruction) GetParameter

func (ins *BlowInstruction) GetParameter(name InstructionParameter) interface{}

func (*BlowInstruction) Params

func (scti *BlowInstruction) Params() MultiTransferParams

func (*BlowInstruction) Visit

func (ins *BlowInstruction) Visit(visitor RobotInstructionVisitor)

type BlowoutInstruction

type BlowoutInstruction struct {
	BaseRobotInstruction
	*InstructionType
	Head     int
	Volume   []wunit.Volume
	Multi    int
	Plt      []string
	What     []string
	LLF      []bool
	Platform string
}

func NewBlowoutInstruction

func NewBlowoutInstruction() *BlowoutInstruction

func (*BlowoutInstruction) Generate

func (*BlowoutInstruction) GetParameter

func (ins *BlowoutInstruction) GetParameter(name InstructionParameter) interface{}

func (*BlowoutInstruction) OutputTo

func (ins *BlowoutInstruction) OutputTo(lhdriver LiquidhandlingDriver) error

func (*BlowoutInstruction) Visit

func (ins *BlowoutInstruction) Visit(visitor RobotInstructionVisitor)

type ChangeAdaptorInstruction

type ChangeAdaptorInstruction struct {
	BaseRobotInstruction
	*InstructionType
	Head           int
	DropPosition   string
	GetPosition    string
	OldAdaptorType string
	NewAdaptorType string
	Platform       string
}

func NewChangeAdaptorInstruction

func NewChangeAdaptorInstruction(head int, droppos, getpos, oldad, newad, platform string) *ChangeAdaptorInstruction

func (*ChangeAdaptorInstruction) Generate

func (*ChangeAdaptorInstruction) GetParameter

func (ins *ChangeAdaptorInstruction) GetParameter(name InstructionParameter) interface{}

func (*ChangeAdaptorInstruction) Visit

type ChannelBlockInstruction

type ChannelBlockInstruction struct {
	BaseRobotInstruction
	*InstructionType
	What       [][]string
	PltFrom    [][]string
	PltTo      [][]string
	WellFrom   [][]string
	WellTo     [][]string
	Volume     [][]wunit.Volume
	FPlateType [][]string
	TPlateType [][]string
	FVolume    [][]wunit.Volume
	TVolume    [][]wunit.Volume
	Component  [][]string                    // array of component name (i.e. Liquid's CName) by [transfer][channel]
	Prms       [][]*wtype.LHChannelParameter // which channel properties apply to each transfer
	Multi      []int
}

func NewChannelBlockInstruction

func NewChannelBlockInstruction() *ChannelBlockInstruction

func (*ChannelBlockInstruction) AddTransferParams

func (ins *ChannelBlockInstruction) AddTransferParams(mct MultiTransferParams)

func (*ChannelBlockInstruction) Generate

By the point at which the ChannelBlockInstruction is used by the Generate method all transfers will share the same policy.

func (*ChannelBlockInstruction) GetParameter

func (ins *ChannelBlockInstruction) GetParameter(name InstructionParameter) interface{}

func (*ChannelBlockInstruction) GetVolumes

func (ins *ChannelBlockInstruction) GetVolumes() []wunit.Volume

func (*ChannelBlockInstruction) MaxMulti

func (ins *ChannelBlockInstruction) MaxMulti() int

func (*ChannelBlockInstruction) Visit

type ChannelScore

type ChannelScore float64

type ChannelScoreFunc

type ChannelScoreFunc interface {
	ScoreCombinedChannel(wunit.Volume, *wtype.LHHead, *wtype.LHAdaptor, *wtype.LHTip) ChannelScore
}

type ChannelTransferInstruction

type ChannelTransferInstruction struct {
	BaseRobotInstruction
	*InstructionType
	What       []string
	PltFrom    []string
	PltTo      []string
	WellFrom   []string
	WellTo     []string
	Volume     []wunit.Volume
	FPlateType []string
	TPlateType []string
	FVolume    []wunit.Volume
	TVolume    []wunit.Volume
	Multi      int // potentially deprecated
	Prms       []*wtype.LHChannelParameter
	TipType    []string
	Component  []string
}

func NewChannelTransferInstruction

func NewChannelTransferInstruction() *ChannelTransferInstruction

func (*ChannelTransferInstruction) Channels

func (cti *ChannelTransferInstruction) Channels() []int

Channels return the channel indexes of each channel used in the instruction

func (*ChannelTransferInstruction) Generate

func (*ChannelTransferInstruction) GetParameter

func (ins *ChannelTransferInstruction) GetParameter(name InstructionParameter) interface{}

func (*ChannelTransferInstruction) Params

func (*ChannelTransferInstruction) Visit

type CloseInstruction

type CloseInstruction struct {
	BaseRobotInstruction
	*InstructionType
	What       []string
	PltFrom    []string
	PltTo      []string
	WellFrom   []string
	WellTo     []string
	Volume     []wunit.Volume
	FPlateType []string
	TPlateType []string
	FVolume    wunit.Volume
	TVolume    wunit.Volume
	Prms       *wtype.LHChannelParameter
}

func NewCloseInstruction

func NewCloseInstruction() *CloseInstruction

func (*CloseInstruction) Generate

func (ins *CloseInstruction) Generate(ctx context.Context, policy *wtype.LHPolicyRuleSet, prms *LHProperties) ([]RobotInstruction, error)

func (*CloseInstruction) GetParameter

func (ins *CloseInstruction) GetParameter(name InstructionParameter) interface{}

func (*CloseInstruction) OutputTo

func (ins *CloseInstruction) OutputTo(lhdriver LiquidhandlingDriver) error

func (*CloseInstruction) Visit

func (ins *CloseInstruction) Visit(visitor RobotInstructionVisitor)

type DefaultChannelScoreFunc

type DefaultChannelScoreFunc struct {
}

func (DefaultChannelScoreFunc) ScoreChannel

func (DefaultChannelScoreFunc) ScoreCombinedChannel

func (sc DefaultChannelScoreFunc) ScoreCombinedChannel(vol wunit.Volume, head *wtype.LHHead, adaptor *wtype.LHAdaptor, tip *wtype.LHTip) ChannelScore

type DispenseInstruction

type DispenseInstruction struct {
	BaseRobotInstruction
	*InstructionType
	Head      int
	Volume    []wunit.Volume
	Multi     int
	Plt       []string
	What      []string
	LLF       []bool
	Platform  string
	Component []string
}

func NewDispenseInstruction

func NewDispenseInstruction() *DispenseInstruction

func (*DispenseInstruction) Generate

func (*DispenseInstruction) GetParameter

func (ins *DispenseInstruction) GetParameter(name InstructionParameter) interface{}

func (*DispenseInstruction) OutputTo

func (ins *DispenseInstruction) OutputTo(lhdriver LiquidhandlingDriver) error

func (*DispenseInstruction) Visit

func (ins *DispenseInstruction) Visit(visitor RobotInstructionVisitor)

type ErrInvalidLiquidType

type ErrInvalidLiquidType struct {
	PolicyNames      []string
	ValidPolicyNames []string
}

ErrInvalidLiquidType is returned when no matching liquid policy is found.

func (ErrInvalidLiquidType) Error

func (err ErrInvalidLiquidType) Error() string

type ExtendedLiquidhandlingDriver

type ExtendedLiquidhandlingDriver interface {
	LiquidhandlingDriver
	SetPositionState(position string, state driver.PositionState) driver.CommandStatus
	GetCurrentPosition(head int) (string, driver.CommandStatus)
	GetPositionState(position string) (string, driver.CommandStatus)
	GetHeadState(head int) (string, driver.CommandStatus)
	GetStatus() (driver.Status, driver.CommandStatus)
	UnloadHead(param int) driver.CommandStatus
	LoadHead(param int) driver.CommandStatus
	LightsOn() driver.CommandStatus
	LightsOff() driver.CommandStatus
	LoadAdaptor(param int) driver.CommandStatus
	//MoveRaw move head to the exact location
	MoveRaw(head int, x, y, z float64) driver.CommandStatus
	UnloadAdaptor(param int) driver.CommandStatus
	Open() driver.CommandStatus
	Close() driver.CommandStatus
}

should be named UnimplementedLiquidHandlingDriver

type FinalizeInstruction

type FinalizeInstruction struct {
	BaseRobotInstruction
	*InstructionType
}

func NewFinalizeInstruction

func NewFinalizeInstruction() *FinalizeInstruction

func (*FinalizeInstruction) Generate

func (*FinalizeInstruction) GetParameter

func (ins *FinalizeInstruction) GetParameter(name InstructionParameter) interface{}

func (*FinalizeInstruction) OutputTo

func (ins *FinalizeInstruction) OutputTo(lhdriver LiquidhandlingDriver) error

func (*FinalizeInstruction) Visit

func (ins *FinalizeInstruction) Visit(visitor RobotInstructionVisitor)

type HighLevelLiquidhandlingDriver

type HighLevelLiquidhandlingDriver interface {
	LiquidhandlingDriver
	Transfer(what, platefrom, wellfrom, plateto, wellto []string, volume []float64) driver.CommandStatus
}

type IDSet

type IDSet []string

type ITree

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

ITree the Instruction Tree - takes a high level liquid handling instruction and calls Generate() recursively to produce a tree of instructions with the lowest level "Terminal" robot instructions at the bottom

func NewITree

func NewITree(p RobotInstruction) *ITree

NewITree initialize a new tree with the given parent instruction

func NewITreeRoot

func NewITreeRoot(ch *wtype.IChain) (*ITree, error)

NewITreeRoot create the root layer of the instruction tree. The root layer has a nil instruction with children which correspond to each layer of the IChain

func (*ITree) AddChild

func (tree *ITree) AddChild(ins RobotInstruction)

AddChild add a child to this node of the ITree

func (*ITree) Build

func (tree *ITree) Build(ctx context.Context, lhpr *wtype.LHPolicyRuleSet, initial *LHProperties) (*LHProperties, error)

Build the tree of instructions, starting from the root, discarding any existing children returns the final state and does not alter the initial state

func (*ITree) Children

func (tree *ITree) Children() []*ITree

Children get the children of this node of the tree

func (*ITree) Instruction

func (tree *ITree) Instruction() RobotInstruction

Instruction get the instruction associated with this node of the tree

func (*ITree) Leaves

func (tree *ITree) Leaves() []TerminalRobotInstruction

Leaves returns the leaves of the tree - i.e. the TerminalRobotInstructions

func (*ITree) NumLeaves

func (tree *ITree) NumLeaves() int

NumLeaves returns the number of leaves at the bottom of the tree

func (*ITree) Refine

func (tree *ITree) Refine(types ...*InstructionType) []*ITree

Refine returns a slice containing more precise instructions. Returns the lowest possible descendents of this node, stopping either at leaves or if the instruction type is given in the argument e.g. for a tree with instruction types A,B,C,D,E of the form

   A
 /   \
B     C
|    / \
D   D'  E

then:

  • A.Refine(C) returns [D, C]
  • A.Refine(B) returns [B, D', E]
  • A.Refine() returns [D, D', E], the leaves of the tree

func (*ITree) String

func (tree *ITree) String() string

String return a multi-line representation of the ITree showing instructions types

type InitializeInstruction

type InitializeInstruction struct {
	BaseRobotInstruction
	*InstructionType
}

func NewInitializeInstruction

func NewInitializeInstruction() *InitializeInstruction

func (*InitializeInstruction) Generate

func (*InitializeInstruction) GetParameter

func (ins *InitializeInstruction) GetParameter(name InstructionParameter) interface{}

func (*InitializeInstruction) OutputTo

func (ins *InitializeInstruction) OutputTo(lhdriver LiquidhandlingDriver) error

func (*InitializeInstruction) Visit

func (ins *InitializeInstruction) Visit(visitor RobotInstructionVisitor)

type InsByCol

type InsByCol []*wtype.LHInstruction

func (InsByCol) Len

func (ibc InsByCol) Len() int

func (InsByCol) Less

func (ibc InsByCol) Less(i, j int) bool

func (InsByCol) Swap

func (ibc InsByCol) Swap(i, j int)

type InsByComponent

type InsByComponent []*wtype.LHInstruction

func (InsByComponent) Len

func (ibc InsByComponent) Len() int

func (InsByComponent) Less

func (ibc InsByComponent) Less(i, j int) bool

func (InsByComponent) Swap

func (ibc InsByComponent) Swap(i, j int)

type InsByRow

type InsByRow []*wtype.LHInstruction

func (InsByRow) Len

func (ibc InsByRow) Len() int

func (InsByRow) Less

func (ibc InsByRow) Less(i, j int) bool

func (InsByRow) Swap

func (ibc InsByRow) Swap(i, j int)

type InstructionParameter

type InstructionParameter string
const (
	BLOWOUT         InstructionParameter = "BLOWOUT"
	CHANNEL         InstructionParameter = "CHANNEL"
	COMPONENT       InstructionParameter = "COMPONENT"
	CYCLES          InstructionParameter = "CYCLES"
	DRIVE           InstructionParameter = "DRIVE"
	FPLATEWX        InstructionParameter = "FPLATEWX"
	FPLATEWY        InstructionParameter = "FPLATEWY"
	FROMPLATETYPE   InstructionParameter = "FROMPLATETYPE"
	HEAD            InstructionParameter = "HEAD"
	INSTRUCTIONTYPE InstructionParameter = "INSTRUCTIONTYPE"
	LIQUIDCLASS     InstructionParameter = "LIQUIDCLASS" // LIQUIDCLASS refers to the Component Type, This is currently used to look up the corresponding LHPolicy from an LHPolicyRuleSet
	LLF             InstructionParameter = "LLF"
	MESSAGE         InstructionParameter = "MESSAGE"
	MULTI           InstructionParameter = "MULTI"
	NAME            InstructionParameter = "NAME"
	NEWADAPTOR      InstructionParameter = "NEWADAPTOR"
	NEWSTATE        InstructionParameter = "NEWSTATE"
	OFFSETX         InstructionParameter = "OFFSETX"
	OFFSETY         InstructionParameter = "OFFSETY"
	OFFSETZ         InstructionParameter = "OFFSETZ"
	OLDADAPTOR      InstructionParameter = "OLDADAPTOR"
	OLDSTATE        InstructionParameter = "OLDSTATE"
	OVERSTROKE      InstructionParameter = "OVERSTROKE"
	PARAMS          InstructionParameter = "PARAMS"
	PLATE           InstructionParameter = "PLATE"
	PLATETYPE       InstructionParameter = "PLATETYPE"
	PLATFORM        InstructionParameter = "PLATFORM"
	PLT             InstructionParameter = "PLT"
	POS             InstructionParameter = "POS"
	POSFROM         InstructionParameter = "POSFROM"
	POSITION        InstructionParameter = "POSITION"
	POSTO           InstructionParameter = "POSTO"
	REFERENCE       InstructionParameter = "REFERENCE"
	SPEED           InstructionParameter = "SPEED"
	TIME            InstructionParameter = "TIME"
	TIPTYPE         InstructionParameter = "TIPTYPE"
	TOPLATETYPE     InstructionParameter = "TOPLATETYPE"
	TPLATEWX        InstructionParameter = "TPLATEWX"
	TPLATEWY        InstructionParameter = "TPLATEWY"
	VOLUME          InstructionParameter = "VOLUME"
	VOLUNT          InstructionParameter = "VOLUNT"
	WELL            InstructionParameter = "WELL"
	WELLFROM        InstructionParameter = "WELLFROM"
	WELLFROMVOLUME  InstructionParameter = "WELLFROMVOLUME"
	WELLTO          InstructionParameter = "WELLTO"
	WELLTOVOLUME    InstructionParameter = "WELLTOVOLUME" // WELLTOVOLUME refers to the volume of liquid already present in the well location for which a sample is due to be transferred to.
	WELLVOLUME      InstructionParameter = "WELLVOLUME"
	WHAT            InstructionParameter = "WHAT"
	WHICH           InstructionParameter = "WHICH" // WHICH returns the Component IDs, i.e. representing the specific instance of an LHComponent not currently implemented.
	WAIT            InstructionParameter = "WAIT"
)

func (InstructionParameter) String

func (name InstructionParameter) String() string

type InstructionType

type InstructionType struct {
	Name      string `json:"Type"`
	HumanName string `json:"-"`
}

func NewInstructionType

func NewInstructionType(machine, human string) *InstructionType

func (*InstructionType) String

func (it *InstructionType) String() string

func (*InstructionType) Type

func (it *InstructionType) Type() *InstructionType

This exists so that when InstructionType is embedded within other instructions, we can satisfy the RobotInstruction interface with a minimum amount of boilerplate.

type LHIVector

type LHIVector []*wtype.LHInstruction

func (LHIVector) CompsAt

func (lhiv LHIVector) CompsAt(i int) []*wtype.Liquid

func (LHIVector) Generations

func (lhiv LHIVector) Generations() string

func (LHIVector) MaxLen

func (lhiv LHIVector) MaxLen() int

func (LHIVector) String

func (lhiv LHIVector) String() string

type LHProperties

type LHProperties struct {
	ID             string
	Positions      map[string]*wtype.LHPosition // position descriptions by position name
	PlateLookup    map[string]interface{}       // deck object (plate, tipbox, etc) by object ID
	PosLookup      map[string]string            // object ID by position name
	PlateIDLookup  map[string]string            // position name by object ID
	Plates         map[string]*wtype.Plate      // plates by position name
	Tipboxes       map[string]*wtype.LHTipbox   // tipboxes by position name
	Tipwastes      map[string]*wtype.LHTipwaste // tipwastes by position name
	Wastes         map[string]*wtype.Plate      // waste plates by position name
	Washes         map[string]*wtype.Plate      // wash plates by position name
	Model          string
	Mnfr           string
	LHType         LiquidHandlerLevel      // describes which liquidhandling API should be used to communicate with the device
	TipType        TipType                 // defines the type of tips used by the liquidhandler
	Heads          []*wtype.LHHead         // lists every head (whether loaded or not) that is available for the machine
	Adaptors       []*wtype.LHAdaptor      // lists every adaptor (whether loaded or not) that is available for the machine
	HeadAssemblies []*wtype.LHHeadAssembly // describes how each loaded head and adaptor is loaded into the machine
	Tips           []*wtype.LHTip          // lists each type of tip available in the current configuration
	Preferences    *LayoutOpt              // describes where different categories of objects are to be placed on the liquid handler
	Driver         LiquidhandlingDriver    `gotopb:"-"`
}

describes a liquid handler, its capabilities and current state probably needs splitting up to separate out the state information from the properties information

func NewLHProperties

func NewLHProperties(model, manufacturer string, lhtype LiquidHandlerLevel, tiptype TipType, positions map[string]*wtype.LHPosition) *LHProperties

constructor for the above

func (*LHProperties) AddInputPlate

func (lhp *LHProperties) AddInputPlate(plate *wtype.Plate) error

func (*LHProperties) AddOutputPlate

func (lhp *LHProperties) AddOutputPlate(plate *wtype.Plate) error

func (*LHProperties) AddPlateTo

func (lhp *LHProperties) AddPlateTo(addr string, plate *wtype.Plate) error

func (*LHProperties) AddTipBox

func (lhp *LHProperties) AddTipBox(tipbox *wtype.LHTipbox) error

func (*LHProperties) AddTipBoxTo

func (lhp *LHProperties) AddTipBoxTo(addr string, tipbox *wtype.LHTipbox) bool

func (*LHProperties) AddTipWaste

func (lhp *LHProperties) AddTipWaste(tipwaste *wtype.LHTipwaste) error

func (*LHProperties) AddTipWasteTo

func (lhp *LHProperties) AddTipWasteTo(addr string, tipwaste *wtype.LHTipwaste) error

func (*LHProperties) AddWash

func (lhp *LHProperties) AddWash(wash *wtype.Plate) bool

func (*LHProperties) AddWashTo

func (lhp *LHProperties) AddWashTo(addr string, wash *wtype.Plate) bool

func (*LHProperties) AddWaste

func (lhp *LHProperties) AddWaste(waste *wtype.Plate) bool

func (*LHProperties) AddWasteTo

func (lhp *LHProperties) AddWasteTo(addr string, waste *wtype.Plate) bool

func (*LHProperties) ApplyUserPreferences

func (lhp *LHProperties) ApplyUserPreferences(p *LayoutOpt) error

ApplyUserPreferences merge in the layout preferences given by the user.

User preferences for each category should either be list of addresses to place items of that category in order, or empty. If they are empty, then the full list of possible locations as reported by the driver is used.

nb. Because of the difficulties surrounding cross-platform addresses, addresses which are don't exist in this liquid handler are silently ignored such that passing a Gilson address e.g. "position_1" to a Hamilton driver has no effect.

func (*LHProperties) CanPossiblyDo

func (p *LHProperties) CanPossiblyDo(v wunit.Volume) bool

func (LHProperties) CanPrompt

func (p LHProperties) CanPrompt() bool

func (*LHProperties) CarryVolume

func (p *LHProperties) CarryVolume() wunit.Volume

func (*LHProperties) CountHeadsLoaded

func (lhp *LHProperties) CountHeadsLoaded() int

CountHeadsLoaded return the total number of heads loaded into the machine

func (*LHProperties) DeckSummary

func (p *LHProperties) DeckSummary() string

func (*LHProperties) DropDirtyTips

func (lhp *LHProperties) DropDirtyTips(channels []*wtype.LHChannelParameter) (wells, positions, boxtypes []string)

DropDirtyTips figure out where tips attached to the non-nil channels in channels can be disposed The return arrays are the same length as channels

func (*LHProperties) Dup

func (lhp *LHProperties) Dup() *LHProperties

copy constructor

func (*LHProperties) DupKeepIDs

func (lhp *LHProperties) DupKeepIDs() *LHProperties

func (*LHProperties) Exists

func (lhp *LHProperties) Exists(address string) bool

Exists returns true if the given address refers to a known position

func (*LHProperties) GetChannelScoreFunc

func (lhp *LHProperties) GetChannelScoreFunc() ChannelScoreFunc

func (*LHProperties) GetCleanTips

func (lhp *LHProperties) GetCleanTips(ctx context.Context, tiptype []string, channel []*wtype.LHChannelParameter, usetiptracking bool) (wells, positions, boxtypes [][]string, err error)

func (*LHProperties) GetComponents

func (lhp *LHProperties) GetComponents(cmps wtype.ComponentVector, ori wtype.ChannelOrientation, multi int, independent bool, legacyVolume bool) ([]ParallelTransfer, error)

func (*LHProperties) GetComponentsSingle

func (lhp *LHProperties) GetComponentsSingle(cmps []*wtype.Liquid, carryvol wunit.Volume, legacyVolume bool) ([][]string, [][]string, [][]wunit.Volume, error)

func (*LHProperties) GetLHType

func (lhp *LHProperties) GetLHType() LiquidHandlerLevel

GetLHType returns the declared type of liquid handler for driver selection purposes e.g. High-Level (HLLiquidHandler) or Low-Level (LLLiquidHandler) see lhtype.go in this directory

func (LHProperties) GetLayout

func (p LHProperties) GetLayout() string

func (*LHProperties) GetLoadedAdaptor

func (lhp *LHProperties) GetLoadedAdaptor(i int) *wtype.LHAdaptor

GetLoadedAdaptor get the adaptor loaded to the i^th head

func (*LHProperties) GetLoadedAdaptors

func (lhp *LHProperties) GetLoadedAdaptors() []*wtype.LHAdaptor

GetLoadedAdaptors get a slice of all the adaptors loaded in the machine

func (*LHProperties) GetLoadedHead

func (lhp *LHProperties) GetLoadedHead(i int) *wtype.LHHead

GetLoadedHead returns a specific head

func (*LHProperties) GetLoadedHeads

func (lhp *LHProperties) GetLoadedHeads() []*wtype.LHHead

GetLoadedHeads get a slice of all the heads loaded in the machine

func (*LHProperties) GetSetupInstructions

func (p *LHProperties) GetSetupInstructions() []TerminalRobotInstruction

func (*LHProperties) GetSourcesFor

func (lhp *LHProperties) GetSourcesFor(ori wtype.ChannelOrientation, multi int, maps ...func(*wtype.Liquid) *wtype.Liquid) []wtype.ComponentVector

GetSourcesFor find all liquids in LHProperties which could be used to supply the requested cmps with the given configuration

func (*LHProperties) GetTimer

func (lhp *LHProperties) GetTimer() LHTimer

func (*LHProperties) GetTipType

func (lhp *LHProperties) GetTipType() TipType

GetTipType returns the tip requirements of the liquid handler options are None, Disposable, Fixed, Mixed see lhtype.go in this directory

func (LHProperties) HasTipTracking

func (p LHProperties) HasTipTracking() bool

func (*LHProperties) InputSearchPreferences

func (lhp *LHProperties) InputSearchPreferences() []string

func (*LHProperties) IsAddressable

func (p *LHProperties) IsAddressable(pos string, crd wtype.WellCoords, channel, reference int, offsetX, offsetY, offsetZ float64) bool

func (*LHProperties) IsEmpty

func (lhp *LHProperties) IsEmpty(address string) bool

IsEmpty returns true if the given position exists and is unoccupied

func (*LHProperties) MarshalJSON

func (lhp *LHProperties) MarshalJSON() ([]byte, error)

func (*LHProperties) MinPossibleVolume

func (p *LHProperties) MinPossibleVolume() wunit.Volume

func (*LHProperties) OrderedMergedPlatePrefs

func (p *LHProperties) OrderedMergedPlatePrefs() []string

func (LHProperties) OrderedPositionNames

func (p LHProperties) OrderedPositionNames() []string

func (LHProperties) OutputLayout

func (p LHProperties) OutputLayout()

func (*LHProperties) RemoveComponent

func (lhp *LHProperties) RemoveComponent(plateID string, well string, volume wunit.Volume) bool

func (*LHProperties) RemovePlateAtPosition

func (lhp *LHProperties) RemovePlateAtPosition(addr string)

func (*LHProperties) RemovePlateWithID

func (lhp *LHProperties) RemovePlateWithID(id string)

func (*LHProperties) RemoveTipBoxes

func (lhp *LHProperties) RemoveTipBoxes()

func (*LHProperties) RestoreUserPlates

func (p *LHProperties) RestoreUserPlates(up UserPlates)

func (*LHProperties) SaveUserPlates

func (p *LHProperties) SaveUserPlates() UserPlates

func (*LHProperties) TipSpacesLeft

func (lhp *LHProperties) TipSpacesLeft() int

func (*LHProperties) TipWastesMounted

func (lhp *LHProperties) TipWastesMounted() int

func (*LHProperties) UnmarshalJSON

func (lhp *LHProperties) UnmarshalJSON(data []byte) error

func (*LHProperties) UpdateComponentID

func (p *LHProperties) UpdateComponentID(from string, to *wtype.Liquid) bool

func (*LHProperties) UpdateComponentIDs

func (p *LHProperties) UpdateComponentIDs(updates map[string]*wtype.Liquid)

func (*LHProperties) UpdateID

func (lhp *LHProperties) UpdateID(currID string) (string, error)

UpdateID update the id of the object with currID, returning the new ID and an error if no such object was found

type LHTimer

type LHTimer interface {
	TimeFor(r RobotInstruction) time.Duration
}

LHTimer provides timing for instructions

func GetTimerFor

func GetTimerFor(model, mnfr string) LHTimer

type LayoutOpt

type LayoutOpt struct {
	Tipboxes  Addresses // locations where boxes of tips can be placed
	Inputs    Addresses // plates containing input solutions
	Outputs   Addresses // plates that will have output solutions added to them
	Tipwastes Addresses // for disposing of tips - often device specific
	Wastes    Addresses // for disponsing of waste liquids
	Washes    Addresses // for washing
}

LayoutOpt describes the options available for layout of various types of objects on a liquidhandler deck, listed in priority order from highest to lowest

func (*LayoutOpt) ApplyUserPreferences

func (lo *LayoutOpt) ApplyUserPreferences(user *LayoutOpt) (*LayoutOpt, error)

ApplyUserPreferences combine the user supplied preferences with the driver plugin supplied rules An error is returned if the user requests an object be placed in a location that the driver has not allowed, i.e. the user preferences must be a subset of the driver rules, but can specify any order of the acceptable addresses.

Nb. (HJK) If the user preferences for any category are empty, they are replaced by the driver's defaults. This is because currently the UI cannot access the set of driver defaults (and they will soon vary with the specific device instance not just device type), so a blank entry signifies defaults. This has the side effect that it is not possible for the user to specify that there are no positions for objects of a particular type. This seems like an unlikely use case, so it was decided to proceed as is until there is UX in place to correctly set these preferences

func (*LayoutOpt) Dup

func (lo *LayoutOpt) Dup() *LayoutOpt

Dup return a copy of the layout options

type LightsOffInstruction

type LightsOffInstruction struct {
	BaseRobotInstruction
	*InstructionType
	What       []string
	PltFrom    []string
	PltTo      []string
	WellFrom   []string
	WellTo     []string
	Volume     []wunit.Volume
	FPlateType []string
	TPlateType []string
	FVolume    wunit.Volume
	TVolume    wunit.Volume
	Prms       *wtype.LHChannelParameter
}

func NewLightsOffInstruction

func NewLightsOffInstruction() *LightsOffInstruction

func (*LightsOffInstruction) Generate

func (*LightsOffInstruction) GetParameter

func (ins *LightsOffInstruction) GetParameter(name InstructionParameter) interface{}

func (*LightsOffInstruction) OutputTo

func (ins *LightsOffInstruction) OutputTo(lhdriver LiquidhandlingDriver) error

func (*LightsOffInstruction) Visit

func (ins *LightsOffInstruction) Visit(visitor RobotInstructionVisitor)

type LightsOnInstruction

type LightsOnInstruction struct {
	BaseRobotInstruction
	*InstructionType
	What       []string
	PltFrom    []string
	PltTo      []string
	WellFrom   []string
	WellTo     []string
	Volume     []wunit.Volume
	FPlateType []string
	TPlateType []string
	FVolume    wunit.Volume
	TVolume    wunit.Volume
	Prms       *wtype.LHChannelParameter
}

func NewLightsOnInstruction

func NewLightsOnInstruction() *LightsOnInstruction

func (*LightsOnInstruction) Generate

func (*LightsOnInstruction) GetParameter

func (ins *LightsOnInstruction) GetParameter(name InstructionParameter) interface{}

func (*LightsOnInstruction) OutputTo

func (ins *LightsOnInstruction) OutputTo(lhdriver LiquidhandlingDriver) error

func (*LightsOnInstruction) Visit

func (ins *LightsOnInstruction) Visit(visitor RobotInstructionVisitor)

type LiquidHandlerLevel

type LiquidHandlerLevel int

consts for generic liquid handling types

const (
	LLLiquidHandler LiquidHandlerLevel = iota // requires detailed programming e.g. move, aspirate, move dispense etc.
	HLLiquidHandler                           // can orchestrate liquid transfers itself
)

func (LiquidHandlerLevel) IsValid

func (lhl LiquidHandlerLevel) IsValid() bool

func (LiquidHandlerLevel) String

func (lhl LiquidHandlerLevel) String() string

type LiquidhandlingDriver

type LiquidhandlingDriver interface {
	DriverType() ([]string, error)
	//AddPlateTo add an LHObject to a particular position in the liquid handler
	//position: the name of the position defined in LHProperties struct
	//plate: the LHObject to add
	//name: the name of the plate, should match wtype.NameOf(plate)
	AddPlateTo(position string, plate interface{}, name string) driver.CommandStatus
	//RemoveAllPlates remove every object in the machine
	RemoveAllPlates() driver.CommandStatus
	RemovePlateAt(position string) driver.CommandStatus
	Initialize() driver.CommandStatus
	Finalize() driver.CommandStatus
	Message(level int, title, text string, showcancel bool) driver.CommandStatus
	GetOutputFile() ([]byte, driver.CommandStatus)
	GetCapabilities() (LHProperties, driver.CommandStatus)
}

type LoadAdaptorInstruction

type LoadAdaptorInstruction struct {
	BaseRobotInstruction
	*InstructionType
	What       []string
	PltFrom    []string
	PltTo      []string
	WellFrom   []string
	WellTo     []string
	Volume     []wunit.Volume
	FPlateType []string
	TPlateType []string
	FVolume    wunit.Volume
	TVolume    wunit.Volume
	Prms       *wtype.LHChannelParameter
}

func NewLoadAdaptorInstruction

func NewLoadAdaptorInstruction() *LoadAdaptorInstruction

func (*LoadAdaptorInstruction) Generate

func (*LoadAdaptorInstruction) GetParameter

func (ins *LoadAdaptorInstruction) GetParameter(name InstructionParameter) interface{}

func (*LoadAdaptorInstruction) OutputTo

func (ins *LoadAdaptorInstruction) OutputTo(lhdriver LiquidhandlingDriver) error

func (*LoadAdaptorInstruction) Visit

func (ins *LoadAdaptorInstruction) Visit(visitor RobotInstructionVisitor)

type LoadTipsInstruction

type LoadTipsInstruction struct {
	BaseRobotInstruction
	*InstructionType
	Head       int
	Pos        []string
	Well       []string
	Channels   []int
	TipType    []string
	HolderType []string
	Multi      int
	Platform   string
}

func NewLoadTipsInstruction

func NewLoadTipsInstruction() *LoadTipsInstruction

func (*LoadTipsInstruction) Generate

func (*LoadTipsInstruction) GetParameter

func (ins *LoadTipsInstruction) GetParameter(name InstructionParameter) interface{}

func (*LoadTipsInstruction) OutputTo

func (ins *LoadTipsInstruction) OutputTo(lhdriver LiquidhandlingDriver) error

func (*LoadTipsInstruction) Visit

func (ins *LoadTipsInstruction) Visit(visitor RobotInstructionVisitor)

type LoadTipsMoveInstruction

type LoadTipsMoveInstruction struct {
	BaseRobotInstruction
	*InstructionType
	Head       int
	Well       []string
	FPosition  []string
	FPlateType []string
	Multi      int
	Platform   string
}

func NewLoadTipsMoveInstruction

func NewLoadTipsMoveInstruction() *LoadTipsMoveInstruction

func (*LoadTipsMoveInstruction) Generate

func (*LoadTipsMoveInstruction) GetParameter

func (ins *LoadTipsMoveInstruction) GetParameter(name InstructionParameter) interface{}

func (*LoadTipsMoveInstruction) Visit

type LowLevelLiquidhandlingDriver

type LowLevelLiquidhandlingDriver interface {
	LiquidhandlingDriver
	//Move move the head to the given position
	//slices deckposition, wellcoords, reference, offsetX,Y,Z and plate_type should be
	//equal in length to the number of channels on the adaptor. Some elements can be nil or "" to signal
	//that the location of these channels are not specified and can be moved to anywhere compatible with robot geometry
	//deckposition: the name of the location on the deck
	//plate_type: the type of plate which should be present there
	//wellcoords: the well that each adaptor should line up with (e.g. in "A1" format),
	//reference: the position of the well/tip to align to: 0 = well bottom, 1 = well top, 2 = liquid level (undefined for tips)
	//offsetX,Y,Z: a relative offset from this position in mm
	//head: identifies which head should be moved in a multi-head system
	Move(deckposition []string, wellcoords []string, reference []int, offsetX, offsetY, offsetZ []float64, plate_type []string, head int) driver.CommandStatus
	//Aspirate suck up liquid into the loaded tips
	//volume, overstroke, platetype, what and llf must be equal in length to the number of channels in the adaptor
	//volume: amount to aspirate in ul
	//overstroke:
	//head: which head to use
	//multi: the number of channels given an instruction
	//platetype: the type of plate which should be present below the adaptor
	//what: liquid class name
	//llf: liquidlevelfollow attempt to follow liquid surface
	Aspirate(volume []float64, overstroke []bool, head int, multi int, platetype []string, what []string, llf []bool) driver.CommandStatus
	//Dispense eject liquid from the loaded tips
	//volume, blowout, platetype, what and llf must be equal in length to the number of channels in the adaptor
	//volume: amount to dispense in ul
	//blowout: dispense extra to attempt to remove droplets
	//head: which head to use
	//multi: the number of channels given an instruction
	//platetype: the type of plate which should be present below the adaptor
	//what: liquid class name
	//llf: liquidlevelfollow attempt to follow liquid surface
	Dispense(volume []float64, blowout []bool, head int, multi int, platetype []string, what []string, llf []bool) driver.CommandStatus
	//LoadTips add tips to the given channels
	//channels: list of which channels should end up with tips on them. values of platetype, position, well that aren't given
	//in channels can be left as ""
	//head: the head to use
	//multi: the number of channels given an instruction
	//platetype: the type of plate below each channel
	//position: the name of the deck position below the channel
	//well: the well below the adaptor channel
	LoadTips(channels []int, head, multi int, platetype, position, well []string) driver.CommandStatus
	//UnloadTips remove tips from the given channels
	//channels: list of which channels should have tips removed from them. values of platetype, position, well that aren't given
	//in channels can be left as ""
	//head: the head to use
	//multi: the number of channels given an instruction
	//platetype: the type of plate below each channel
	//position: the name of the deck position below the channel
	//well: the well below the adaptor channel
	UnloadTips(channels []int, head, multi int, platetype, position, well []string) driver.CommandStatus
	//SetPipetteSpeed set the rate of aspirate and dispense commands
	//non-independent heads can only have the same rate for each channel
	//rate units of ml/min
	SetPipetteSpeed(head, channel int, rate float64) driver.CommandStatus
	//SetDriveSpeed set the speed with which the robot head moves
	//units unknown...
	SetDriveSpeed(drive string, rate float64) driver.CommandStatus
	Wait(time float64) driver.CommandStatus
	//Mix pipette up and down
	Mix(head int, volume []float64, platetype []string, cycles []int, multi int, what []string, blowout []bool) driver.CommandStatus
	ResetPistons(head, channel int) driver.CommandStatus
	UpdateMetaData(props *LHProperties) driver.CommandStatus
}

type MessageInstruction

type MessageInstruction struct {
	BaseRobotInstruction
	*InstructionType
	Message     string
	WaitTime    time.Duration
	PassThrough map[string]*wtype.Liquid
}

func NewMessageInstruction

func NewMessageInstruction(lhi *wtype.LHInstruction) *MessageInstruction

func (*MessageInstruction) Generate

func (*MessageInstruction) GetParameter

func (msi *MessageInstruction) GetParameter(name InstructionParameter) interface{}

func (*MessageInstruction) OutputTo

func (msi *MessageInstruction) OutputTo(driver LiquidhandlingDriver) error

OutputTo is expected to produce output of 5 forms according to the combination of Message and WaitTime An intermediate messageWaitInstruction is generated first which handles the logic of how this occurs. The 5 forms are: 1. A prompt with a wait time:

  • should generate a wait instruction followed by a message instruction

2. A prompt with no wait time:

  • should just generate a message instruction

3. A wait time with no prompt:

  • should generate an empty prompt instruction followed by a wait instruction
  • the generation of the empty prompt is critical to correct generation of the correct wait instruction in trilution

4. A magic barrier prompt with no wait time:

  • should not generate either instruction (the prompt is just there to split the workflow)

5. A magic barrier prompt with a wait time:

  • should generate an error

func (*MessageInstruction) PreOutput

func (msi *MessageInstruction) PreOutput() (messageWaitInstruction, error)

func (*MessageInstruction) Visit

func (ins *MessageInstruction) Visit(visitor RobotInstructionVisitor)

type MixInstruction

type MixInstruction struct {
	BaseRobotInstruction
	*InstructionType
	Head      int
	Volume    []wunit.Volume
	PlateType []string
	What      []string
	Blowout   []bool
	Multi     int
	Cycles    []int
}

func NewMixInstruction

func NewMixInstruction() *MixInstruction

func (*MixInstruction) Generate

func (ins *MixInstruction) Generate(ctx context.Context, policy *wtype.LHPolicyRuleSet, prms *LHProperties) ([]RobotInstruction, error)

func (*MixInstruction) GetParameter

func (ins *MixInstruction) GetParameter(name InstructionParameter) interface{}

func (*MixInstruction) OutputTo

func (mi *MixInstruction) OutputTo(lhdriver LiquidhandlingDriver) error

func (*MixInstruction) Visit

func (ins *MixInstruction) Visit(visitor RobotInstructionVisitor)

type MovAsp

func NewMovAsp

func NewMovAsp(mov *MoveInstruction, asp *AspirateInstruction) *MovAsp

func (MovAsp) Check

func (ma MovAsp) Check(lhpr wtype.LHPolicyRule) bool

func (MovAsp) Generate

func (ma MovAsp) Generate(ctx context.Context, policy *wtype.LHPolicyRuleSet, prms *LHProperties) ([]RobotInstruction, error)

func (MovAsp) GetParameter

func (ma MovAsp) GetParameter(name InstructionParameter) interface{}

func (*MovAsp) Visit

func (ma *MovAsp) Visit(visitor RobotInstructionVisitor)

type MovBlo

func NewMovBlo

func NewMovBlo(mov *MoveInstruction, blo *BlowoutInstruction) *MovBlo

func (MovBlo) Check

func (mb MovBlo) Check(lhpr wtype.LHPolicyRule) bool

func (MovBlo) Generate

func (mb MovBlo) Generate(ctx context.Context, policy *wtype.LHPolicyRuleSet, prms *LHProperties) ([]RobotInstruction, error)

func (MovBlo) GetParameter

func (mb MovBlo) GetParameter(name InstructionParameter) interface{}

func (*MovBlo) Visit

func (mb *MovBlo) Visit(visitor RobotInstructionVisitor)

type MovDsp

func NewMovDsp

func NewMovDsp(mov *MoveInstruction, dsp *DispenseInstruction) *MovDsp

func (MovDsp) Check

func (md MovDsp) Check(lhpr wtype.LHPolicyRule) bool

func (MovDsp) Generate

func (md MovDsp) Generate(ctx context.Context, policy *wtype.LHPolicyRuleSet, prms *LHProperties) ([]RobotInstruction, error)

func (MovDsp) GetParameter

func (md MovDsp) GetParameter(name InstructionParameter) interface{}

func (*MovDsp) Visit

func (md *MovDsp) Visit(visitor RobotInstructionVisitor)

type MovMix

func NewMovMix

func NewMovMix(mov *MoveInstruction, mix *MixInstruction) *MovMix

func (MovMix) Check

func (mm MovMix) Check(lhpr wtype.LHPolicyRule) bool

func (MovMix) Generate

func (mm MovMix) Generate(ctx context.Context, policy *wtype.LHPolicyRuleSet, prms *LHProperties) ([]RobotInstruction, error)

func (MovMix) GetParameter

func (mm MovMix) GetParameter(name InstructionParameter) interface{}

func (*MovMix) Visit

func (mm *MovMix) Visit(visitor RobotInstructionVisitor)

type MoveInstruction

type MoveInstruction struct {
	BaseRobotInstruction
	*InstructionType
	Head      int
	Pos       []string
	Plt       []string
	Well      []string
	WVolume   []wunit.Volume
	Reference []int
	OffsetX   []float64
	OffsetY   []float64
	OffsetZ   []float64
	Platform  string
}

func NewMoveInstruction

func NewMoveInstruction() *MoveInstruction

func (*MoveInstruction) Generate

func (ins *MoveInstruction) Generate(ctx context.Context, policy *wtype.LHPolicyRuleSet, prms *LHProperties) ([]RobotInstruction, error)

func (*MoveInstruction) GetParameter

func (ins *MoveInstruction) GetParameter(name InstructionParameter) interface{}

func (*MoveInstruction) MaybeMerge

func (ins *MoveInstruction) MaybeMerge(next RobotInstruction) RobotInstruction

func (*MoveInstruction) OutputTo

func (ins *MoveInstruction) OutputTo(lhdriver LiquidhandlingDriver) error

func (*MoveInstruction) Visit

func (ins *MoveInstruction) Visit(visitor RobotInstructionVisitor)

type MoveMixInstruction

type MoveMixInstruction struct {
	BaseRobotInstruction
	*InstructionType
	Head      int
	Plt       []string
	Well      []string
	Volume    []wunit.Volume // volume of sample being transferred
	PlateType []string
	FVolume   []wunit.Volume // Total volume of sample in the well which the sample is being mixed into?
	Cycles    []int
	What      []string
	Blowout   []bool
	OffsetX   []float64
	OffsetY   []float64
	OffsetZ   []float64
	Multi     int
	Prms      map[string]interface{}
}

func NewMoveMixInstruction

func NewMoveMixInstruction() *MoveMixInstruction

func (*MoveMixInstruction) Generate

func (*MoveMixInstruction) GetParameter

func (ins *MoveMixInstruction) GetParameter(name InstructionParameter) interface{}

func (*MoveMixInstruction) Visit

func (ins *MoveMixInstruction) Visit(visitor RobotInstructionVisitor)

type MoveRawInstruction

type MoveRawInstruction struct {
	BaseRobotInstruction
	*InstructionType
	Head       int
	What       []string
	PltFrom    []string
	PltTo      []string
	WellFrom   []string
	WellTo     []string
	Volume     []wunit.Volume
	FPlateType []string
	TPlateType []string
	FVolume    []wunit.Volume
	TVolume    []wunit.Volume
	Prms       *wtype.LHChannelParameter
}

func NewMoveRawInstruction

func NewMoveRawInstruction() *MoveRawInstruction

func (*MoveRawInstruction) Generate

func (*MoveRawInstruction) GetParameter

func (ins *MoveRawInstruction) GetParameter(name InstructionParameter) interface{}

func (*MoveRawInstruction) OutputTo

func (ins *MoveRawInstruction) OutputTo(lhdriver LiquidhandlingDriver) error

func (*MoveRawInstruction) Visit

func (ins *MoveRawInstruction) Visit(visitor RobotInstructionVisitor)

type MultiTransferParams

type MultiTransferParams struct {
	Multi     int
	Transfers []TransferParams
}

func MTPFromArrays

func MTPFromArrays(what, pltfrom, pltto, wellfrom, wellto, fplatetype, tplatetype []string, volume, fvolume, tvolume []wunit.Volume, FPlateWX, FPlateWY, TPlateWX, TPlateWY []int, Components []string, policies []wtype.LHPolicy) MultiTransferParams

func NewMultiTransferParams

func NewMultiTransferParams(multi int) MultiTransferParams

func (MultiTransferParams) AddTVolumes

func (mtp MultiTransferParams) AddTVolumes(vols []wunit.Volume)

AddTVolumes increase the TVolume (to volumes) of the ith transfer by vols[i]

func (MultiTransferParams) Channel

func (mtp MultiTransferParams) Channel() []*wtype.LHChannelParameter

func (MultiTransferParams) Channels

func (mtp MultiTransferParams) Channels() []*wtype.LHChannelParameter

func (MultiTransferParams) Component

func (mtp MultiTransferParams) Component() []string

func (MultiTransferParams) Dup

func (MultiTransferParams) FPlateType

func (mtp MultiTransferParams) FPlateType() []string

func (MultiTransferParams) FPlateWX

func (mtp MultiTransferParams) FPlateWX() []int

func (MultiTransferParams) FPlateWY

func (mtp MultiTransferParams) FPlateWY() []int

func (MultiTransferParams) FVolume

func (mtp MultiTransferParams) FVolume() []wunit.Volume

func (MultiTransferParams) ParamSet

func (mtp MultiTransferParams) ParamSet(n int) TransferParams

func (MultiTransferParams) PltFrom

func (mtp MultiTransferParams) PltFrom() []string

func (MultiTransferParams) PltTo

func (mtp MultiTransferParams) PltTo() []string

func (MultiTransferParams) RemoveBlanks

func (mtp MultiTransferParams) RemoveBlanks() MultiTransferParams

func (MultiTransferParams) RemoveFVolumes

func (mtp MultiTransferParams) RemoveFVolumes(vols []wunit.Volume)

RemoveFVolumes reduce the FVolume (from volumes) of the ith transfer by vols[i]

func (MultiTransferParams) RemoveInitialBlanks

func (mtp MultiTransferParams) RemoveInitialBlanks() MultiTransferParams

func (MultiTransferParams) RemoveVolumes

func (mtp MultiTransferParams) RemoveVolumes(vols []wunit.Volume)

RemoveVolumes reduce the volume of the ith transfer by vols[i]

func (MultiTransferParams) TPlateType

func (mtp MultiTransferParams) TPlateType() []string

func (MultiTransferParams) TPlateWX

func (mtp MultiTransferParams) TPlateWX() []int

func (MultiTransferParams) TPlateWY

func (mtp MultiTransferParams) TPlateWY() []int

func (MultiTransferParams) TVolume

func (mtp MultiTransferParams) TVolume() []wunit.Volume

func (MultiTransferParams) TipType

func (mtp MultiTransferParams) TipType() []string

func (MultiTransferParams) ToString

func (mtp MultiTransferParams) ToString() string

func (MultiTransferParams) Volume

func (mtp MultiTransferParams) Volume() []wunit.Volume

func (MultiTransferParams) WellFrom

func (mtp MultiTransferParams) WellFrom() []string

func (MultiTransferParams) WellTo

func (mtp MultiTransferParams) WellTo() []string

func (MultiTransferParams) What

func (mtp MultiTransferParams) What() []string

type OldLHTimer

type OldLHTimer struct {
	Times map[*InstructionType]time.Duration
}

deprecate this mess

func NewTimer

func NewTimer() *OldLHTimer

func (*OldLHTimer) TimeFor

func (t *OldLHTimer) TimeFor(r RobotInstruction) time.Duration

type OpenInstruction

type OpenInstruction struct {
	BaseRobotInstruction
	*InstructionType
	What       []string
	PltFrom    []string
	PltTo      []string
	WellFrom   []string
	WellTo     []string
	Volume     []wunit.Volume
	FPlateType []string
	TPlateType []string
	FVolume    wunit.Volume
	TVolume    wunit.Volume
	Prms       *wtype.LHChannelParameter
}

func NewOpenInstruction

func NewOpenInstruction() *OpenInstruction

func (*OpenInstruction) Generate

func (ins *OpenInstruction) Generate(ctx context.Context, policy *wtype.LHPolicyRuleSet, prms *LHProperties) ([]RobotInstruction, error)

func (*OpenInstruction) GetParameter

func (ins *OpenInstruction) GetParameter(name InstructionParameter) interface{}

func (*OpenInstruction) OutputTo

func (ins *OpenInstruction) OutputTo(lhdriver LiquidhandlingDriver) error

func (*OpenInstruction) Visit

func (ins *OpenInstruction) Visit(visitor RobotInstructionVisitor)

type PTZInstruction

type PTZInstruction struct {
	BaseRobotInstruction
	*InstructionType
	Head    int
	Channel int
}

func NewPTZInstruction

func NewPTZInstruction() *PTZInstruction

func (*PTZInstruction) Generate

func (ins *PTZInstruction) Generate(ctx context.Context, policy *wtype.LHPolicyRuleSet, prms *LHProperties) ([]RobotInstruction, error)

func (*PTZInstruction) GetParameter

func (ins *PTZInstruction) GetParameter(name InstructionParameter) interface{}

func (*PTZInstruction) OutputTo

func (ins *PTZInstruction) OutputTo(lhdriver LiquidhandlingDriver) error

func (*PTZInstruction) Visit

func (ins *PTZInstruction) Visit(visitor RobotInstructionVisitor)

type ParallelTransfer

type ParallelTransfer struct {
	PlateIDs   []string
	WellCoords []string
	Vols       []wunit.Volume
}

type RemoveAllPlatesInstruction

type RemoveAllPlatesInstruction struct {
	BaseRobotInstruction
	*InstructionType
}

func NewRemoveAllPlatesInstruction

func NewRemoveAllPlatesInstruction() *RemoveAllPlatesInstruction

func (*RemoveAllPlatesInstruction) Check

func (*RemoveAllPlatesInstruction) Generate

func (*RemoveAllPlatesInstruction) GetParameter

func (rapi *RemoveAllPlatesInstruction) GetParameter(name InstructionParameter) interface{}

func (*RemoveAllPlatesInstruction) OutputTo

func (*RemoveAllPlatesInstruction) Visit

type ResetInstruction

type ResetInstruction struct {
	BaseRobotInstruction
	*InstructionType
	What       []string
	PltFrom    []string
	PltTo      []string
	WellFrom   []string
	WellTo     []string
	Volume     []wunit.Volume
	FPlateType []string
	TPlateType []string
	FVolume    []wunit.Volume
	TVolume    []wunit.Volume
	Prms       *wtype.LHChannelParameter
}

func NewResetInstruction

func NewResetInstruction() *ResetInstruction

func (*ResetInstruction) AddMultiTransferParams

func (ins *ResetInstruction) AddMultiTransferParams(mtp MultiTransferParams)

func (*ResetInstruction) AddTransferParams

func (ins *ResetInstruction) AddTransferParams(tp TransferParams)

func (*ResetInstruction) Generate

func (ins *ResetInstruction) Generate(ctx context.Context, policy *wtype.LHPolicyRuleSet, prms *LHProperties) ([]RobotInstruction, error)

func (*ResetInstruction) GetParameter

func (ins *ResetInstruction) GetParameter(name InstructionParameter) interface{}

func (*ResetInstruction) Visit

func (ins *ResetInstruction) Visit(visitor RobotInstructionVisitor)

type RobotInstruction

type RobotInstruction interface {
	Type() *InstructionType
	GetParameter(name InstructionParameter) interface{}
	Generate(ctx context.Context, policy *wtype.LHPolicyRuleSet, prms *LHProperties) ([]RobotInstruction, error)
	MaybeMerge(next RobotInstruction) RobotInstruction
	Check(lhpr wtype.LHPolicyRule) bool
	Visit(RobotInstructionVisitor)
}

func DropTips

func DropTips(tiptypes []string, params *LHProperties, channels []*wtype.LHChannelParameter) (RobotInstruction, error)

func DropTips(tiptype string, params *LHProperties, channel *wtype.LHChannelParameter, multi int) (RobotInstruction, error) {

func GetTips

func GetTips(ctx context.Context, tiptypes []string, params *LHProperties, channel []*wtype.LHChannelParameter, usetiptracking bool) ([]RobotInstruction, error)

type RobotInstructionBaseVisitor

type RobotInstructionBaseVisitor struct {
	HandleTransfer        func(*TransferInstruction)
	HandleTransferBlock   func(*TransferBlockInstruction)
	HandleChannelBlock    func(*ChannelBlockInstruction)
	HandleChannelTransfer func(*ChannelTransferInstruction)
	HandleStateChange     func(*StateChangeInstruction)
	HandleLoadTipsMove    func(*LoadTipsMoveInstruction)
	HandleUnloadTipsMove  func(*UnloadTipsMoveInstruction)
	HandleReset           func(*ResetInstruction)
	HandleChangeAdaptor   func(*ChangeAdaptorInstruction)
	HandleAspirate        func(*AspirateInstruction)
	HandleDispense        func(*DispenseInstruction)
	HandleBlowout         func(*BlowoutInstruction)
	HandlePTZ             func(*PTZInstruction)
	HandleMove            func(*MoveInstruction)
	HandleMoveRaw         func(*MoveRawInstruction)
	HandleLoadTips        func(*LoadTipsInstruction)
	HandleUnloadTips      func(*UnloadTipsInstruction)
	HandleSuck            func(*SuckInstruction)
	HandleBlow            func(*BlowInstruction)
	HandleSetPipetteSpeed func(*SetPipetteSpeedInstruction)
	HandleSetDriveSpeed   func(*SetDriveSpeedInstruction)
	HandleInitialize      func(*InitializeInstruction)
	HandleFinalize        func(*FinalizeInstruction)
	HandleWait            func(*WaitInstruction)
	HandleLightsOn        func(*LightsOnInstruction)
	HandleLightsOff       func(*LightsOffInstruction)
	HandleOpen            func(*OpenInstruction)
	HandleClose           func(*CloseInstruction)
	HandleLoadAdaptor     func(*LoadAdaptorInstruction)
	HandleUnloadAdaptor   func(*UnloadAdaptorInstruction)
	HandleMoveMix         func(*MoveMixInstruction)
	HandleMix             func(*MixInstruction)
	HandleMessage         func(*MessageInstruction)
	HandleMovAsp          func(*MovAsp)
	HandleMovDsp          func(*MovDsp)
	HandleMovMix          func(*MovMix)
	HandleMovBlo          func(*MovBlo)
	HandleRemoveAllPlates func(*RemoveAllPlatesInstruction)
	HandleAddPlateTo      func(*AddPlateToInstruction)
	HandleSplitBlock      func(*SplitBlockInstruction)
}

func CompareAspReference

func CompareAspReference(ric *robotInstructionComparator) *RobotInstructionBaseVisitor

func CompareDestOffsets

func CompareDestOffsets(ric *robotInstructionComparator) *RobotInstructionBaseVisitor

func CompareDestPlateType

func CompareDestPlateType(ric *robotInstructionComparator) *RobotInstructionBaseVisitor

func CompareDestPosition

func CompareDestPosition(ric *robotInstructionComparator) *RobotInstructionBaseVisitor

func CompareDestWell

func CompareDestWell(ric *robotInstructionComparator) *RobotInstructionBaseVisitor

func CompareDspReference

func CompareDspReference(ric *robotInstructionComparator) *RobotInstructionBaseVisitor

func CompareMixOffsets

func CompareMixOffsets(ric *robotInstructionComparator) *RobotInstructionBaseVisitor

func CompareMixPosition

func CompareMixPosition(ric *robotInstructionComparator) *RobotInstructionBaseVisitor

func CompareMixReference

func CompareMixReference(ric *robotInstructionComparator) *RobotInstructionBaseVisitor

func CompareSourceOffsets

func CompareSourceOffsets(ric *robotInstructionComparator) *RobotInstructionBaseVisitor

func CompareSourcePlateType

func CompareSourcePlateType(ric *robotInstructionComparator) *RobotInstructionBaseVisitor

func CompareSourcePosition

func CompareSourcePosition(ric *robotInstructionComparator) *RobotInstructionBaseVisitor

func CompareSourceWell

func CompareSourceWell(ric *robotInstructionComparator) *RobotInstructionBaseVisitor

func CompareVolumes

func CompareVolumes(ric *robotInstructionComparator) *RobotInstructionBaseVisitor

func (RobotInstructionBaseVisitor) AddPlateTo

func (self RobotInstructionBaseVisitor) AddPlateTo(ins *AddPlateToInstruction)

func (RobotInstructionBaseVisitor) Aspirate

func (RobotInstructionBaseVisitor) Blow

func (RobotInstructionBaseVisitor) Blowout

func (RobotInstructionBaseVisitor) ChangeAdaptor

func (self RobotInstructionBaseVisitor) ChangeAdaptor(ins *ChangeAdaptorInstruction)

func (RobotInstructionBaseVisitor) ChannelBlock

func (self RobotInstructionBaseVisitor) ChannelBlock(ins *ChannelBlockInstruction)

func (RobotInstructionBaseVisitor) ChannelTransfer

func (self RobotInstructionBaseVisitor) ChannelTransfer(ins *ChannelTransferInstruction)

func (RobotInstructionBaseVisitor) Close

func (RobotInstructionBaseVisitor) Dispense

func (RobotInstructionBaseVisitor) Finalize

func (RobotInstructionBaseVisitor) Initialize

func (self RobotInstructionBaseVisitor) Initialize(ins *InitializeInstruction)

func (RobotInstructionBaseVisitor) LightsOff

func (RobotInstructionBaseVisitor) LightsOn

func (RobotInstructionBaseVisitor) LoadAdaptor

func (self RobotInstructionBaseVisitor) LoadAdaptor(ins *LoadAdaptorInstruction)

func (RobotInstructionBaseVisitor) LoadTips

func (RobotInstructionBaseVisitor) LoadTipsMove

func (self RobotInstructionBaseVisitor) LoadTipsMove(ins *LoadTipsMoveInstruction)

func (RobotInstructionBaseVisitor) Message

func (RobotInstructionBaseVisitor) Mix

func (RobotInstructionBaseVisitor) MovAsp

func (self RobotInstructionBaseVisitor) MovAsp(ins *MovAsp)

func (RobotInstructionBaseVisitor) MovBlo

func (self RobotInstructionBaseVisitor) MovBlo(ins *MovBlo)

func (RobotInstructionBaseVisitor) MovDsp

func (self RobotInstructionBaseVisitor) MovDsp(ins *MovDsp)

func (RobotInstructionBaseVisitor) MovMix

func (self RobotInstructionBaseVisitor) MovMix(ins *MovMix)

func (RobotInstructionBaseVisitor) Move

func (RobotInstructionBaseVisitor) MoveMix

func (RobotInstructionBaseVisitor) MoveRaw

func (RobotInstructionBaseVisitor) Open

func (RobotInstructionBaseVisitor) PTZ

func (RobotInstructionBaseVisitor) RemoveAllPlates

func (self RobotInstructionBaseVisitor) RemoveAllPlates(ins *RemoveAllPlatesInstruction)

func (RobotInstructionBaseVisitor) Reset

func (RobotInstructionBaseVisitor) SetDriveSpeed

func (self RobotInstructionBaseVisitor) SetDriveSpeed(ins *SetDriveSpeedInstruction)

func (RobotInstructionBaseVisitor) SetPipetteSpeed

func (self RobotInstructionBaseVisitor) SetPipetteSpeed(ins *SetPipetteSpeedInstruction)

func (RobotInstructionBaseVisitor) SplitBlock

func (self RobotInstructionBaseVisitor) SplitBlock(ins *SplitBlockInstruction)

func (RobotInstructionBaseVisitor) StateChange

func (self RobotInstructionBaseVisitor) StateChange(ins *StateChangeInstruction)

func (RobotInstructionBaseVisitor) Suck

func (RobotInstructionBaseVisitor) Transfer

func (RobotInstructionBaseVisitor) TransferBlock

func (self RobotInstructionBaseVisitor) TransferBlock(ins *TransferBlockInstruction)

func (RobotInstructionBaseVisitor) UnloadAdaptor

func (self RobotInstructionBaseVisitor) UnloadAdaptor(ins *UnloadAdaptorInstruction)

func (RobotInstructionBaseVisitor) UnloadTips

func (self RobotInstructionBaseVisitor) UnloadTips(ins *UnloadTipsInstruction)

func (RobotInstructionBaseVisitor) UnloadTipsMove

func (self RobotInstructionBaseVisitor) UnloadTipsMove(ins *UnloadTipsMoveInstruction)

func (RobotInstructionBaseVisitor) Wait

type RobotInstructionComparatorFunc

type RobotInstructionComparatorFunc func(*robotInstructionComparator) *RobotInstructionBaseVisitor

type RobotInstructionVisitor

type RobotInstructionVisitor interface {
	Transfer(*TransferInstruction)
	TransferBlock(*TransferBlockInstruction)
	ChannelBlock(*ChannelBlockInstruction)
	ChannelTransfer(*ChannelTransferInstruction)
	StateChange(*StateChangeInstruction)
	LoadTipsMove(*LoadTipsMoveInstruction)
	UnloadTipsMove(*UnloadTipsMoveInstruction)
	Reset(*ResetInstruction)
	ChangeAdaptor(*ChangeAdaptorInstruction)
	Aspirate(*AspirateInstruction)
	Dispense(*DispenseInstruction)
	Blowout(*BlowoutInstruction)
	PTZ(*PTZInstruction)
	Move(*MoveInstruction)
	MoveRaw(*MoveRawInstruction)
	LoadTips(*LoadTipsInstruction)
	UnloadTips(*UnloadTipsInstruction)
	Suck(*SuckInstruction)
	Blow(*BlowInstruction)
	SetPipetteSpeed(*SetPipetteSpeedInstruction)
	SetDriveSpeed(*SetDriveSpeedInstruction)
	Initialize(*InitializeInstruction)
	Finalize(*FinalizeInstruction)
	Wait(*WaitInstruction)
	LightsOn(*LightsOnInstruction)
	LightsOff(*LightsOffInstruction)
	Open(*OpenInstruction)
	Close(*CloseInstruction)
	LoadAdaptor(*LoadAdaptorInstruction)
	UnloadAdaptor(*UnloadAdaptorInstruction)
	MoveMix(*MoveMixInstruction)
	Mix(*MixInstruction)
	Message(*MessageInstruction)
	MovAsp(*MovAsp)
	MovDsp(*MovDsp)
	MovMix(*MovMix)
	MovBlo(*MovBlo)
	RemoveAllPlates(*RemoveAllPlatesInstruction)
	AddPlateTo(*AddPlateToInstruction)
	SplitBlock(*SplitBlockInstruction)
}

type SetDriveSpeedInstruction

type SetDriveSpeedInstruction struct {
	BaseRobotInstruction
	*InstructionType
	Drive string
	Speed float64
}

func NewSetDriveSpeedInstruction

func NewSetDriveSpeedInstruction() *SetDriveSpeedInstruction

func (*SetDriveSpeedInstruction) Generate

func (*SetDriveSpeedInstruction) GetParameter

func (ins *SetDriveSpeedInstruction) GetParameter(name InstructionParameter) interface{}

func (*SetDriveSpeedInstruction) OutputTo

func (ins *SetDriveSpeedInstruction) OutputTo(lhdriver LiquidhandlingDriver) error

func (*SetDriveSpeedInstruction) Visit

type SetOfIDSets

type SetOfIDSets []IDSet

type SetOfMultiTransferParams

type SetOfMultiTransferParams []MultiTransferParams

func (SetOfMultiTransferParams) Channel

func (SetOfMultiTransferParams) Component

func (mtp SetOfMultiTransferParams) Component() []string

func (SetOfMultiTransferParams) FPlateType

func (mtp SetOfMultiTransferParams) FPlateType() []string

func (SetOfMultiTransferParams) FPlateWX

func (mtp SetOfMultiTransferParams) FPlateWX() []int

func (SetOfMultiTransferParams) FPlateWY

func (mtp SetOfMultiTransferParams) FPlateWY() []int

func (SetOfMultiTransferParams) FVolume

func (mtp SetOfMultiTransferParams) FVolume() []wunit.Volume

func (SetOfMultiTransferParams) PltFrom

func (mtp SetOfMultiTransferParams) PltFrom() []string

func (SetOfMultiTransferParams) PltTo

func (mtp SetOfMultiTransferParams) PltTo() []string

func (SetOfMultiTransferParams) TPlateType

func (mtp SetOfMultiTransferParams) TPlateType() []string

func (SetOfMultiTransferParams) TPlateWX

func (mtp SetOfMultiTransferParams) TPlateWX() []int

func (SetOfMultiTransferParams) TPlateWY

func (mtp SetOfMultiTransferParams) TPlateWY() []int

func (SetOfMultiTransferParams) TVolume

func (mtp SetOfMultiTransferParams) TVolume() []wunit.Volume

func (SetOfMultiTransferParams) TipType

func (mtp SetOfMultiTransferParams) TipType() []string

func (SetOfMultiTransferParams) Volume

func (mtp SetOfMultiTransferParams) Volume() []wunit.Volume

func (SetOfMultiTransferParams) WellFrom

func (mtp SetOfMultiTransferParams) WellFrom() []string

func (SetOfMultiTransferParams) WellTo

func (mtp SetOfMultiTransferParams) WellTo() []string

func (SetOfMultiTransferParams) What

func (mtp SetOfMultiTransferParams) What() []string

type SetOfRobotInstructions

type SetOfRobotInstructions struct {
	RobotInstructions []RobotInstruction
}

func (*SetOfRobotInstructions) UnmarshalJSON

func (sori *SetOfRobotInstructions) UnmarshalJSON(b []byte) error

type SetPipetteSpeedInstruction

type SetPipetteSpeedInstruction struct {
	BaseRobotInstruction
	*InstructionType
	Head    int
	Channel int
	Speed   float64
}

func NewSetPipetteSpeedInstruction

func NewSetPipetteSpeedInstruction() *SetPipetteSpeedInstruction

func (*SetPipetteSpeedInstruction) Generate

func (*SetPipetteSpeedInstruction) GetParameter

func (ins *SetPipetteSpeedInstruction) GetParameter(name InstructionParameter) interface{}

func (*SetPipetteSpeedInstruction) OutputTo

func (ins *SetPipetteSpeedInstruction) OutputTo(lhdriver LiquidhandlingDriver) error

func (*SetPipetteSpeedInstruction) Visit

type SplitBlockInstruction

type SplitBlockInstruction struct {
	BaseRobotInstruction
	*InstructionType
	Inss []*wtype.LHInstruction
}

func NewSplitBlockInstruction

func NewSplitBlockInstruction(inss []*wtype.LHInstruction) *SplitBlockInstruction

func (SplitBlockInstruction) Generate

this instruction does not generate anything it just modifies the components in the robot

func (*SplitBlockInstruction) Visit

type StateChangeInstruction

type StateChangeInstruction struct {
	BaseRobotInstruction
	*InstructionType
	OldState *wtype.LHChannelParameter
	NewState *wtype.LHChannelParameter
}

func NewStateChangeInstruction

func NewStateChangeInstruction(oldstate, newstate *wtype.LHChannelParameter) *StateChangeInstruction

func (*StateChangeInstruction) Generate

func (*StateChangeInstruction) GetParameter

func (ins *StateChangeInstruction) GetParameter(name InstructionParameter) interface{}

func (*StateChangeInstruction) Visit

func (ins *StateChangeInstruction) Visit(visitor RobotInstructionVisitor)

type SuckInstruction

type SuckInstruction struct {
	BaseRobotInstruction
	*InstructionType
	Head        int
	What        []string
	ComponentID []string // ID, not currently used. Will be needed soon.
	PltFrom     []string
	WellFrom    []string
	Volume      []wunit.Volume
	FPlateType  []string
	FVolume     []wunit.Volume
	Prms        *wtype.LHChannelParameter
	Multi       int
	Overstroke  bool
	TipType     string
	Component   []string
}

func NewSuckInstruction

func NewSuckInstruction(cti *ChannelTransferInstruction) *SuckInstruction

func (*SuckInstruction) Generate

func (ins *SuckInstruction) Generate(ctx context.Context, policy *wtype.LHPolicyRuleSet, prms *LHProperties) ([]RobotInstruction, error)

func (*SuckInstruction) GetParameter

func (ins *SuckInstruction) GetParameter(name InstructionParameter) interface{}

func (*SuckInstruction) Visit

func (ins *SuckInstruction) Visit(visitor RobotInstructionVisitor)

type TerminalRobotInstruction

type TerminalRobotInstruction interface {
	RobotInstruction
	OutputTo(driver LiquidhandlingDriver) error
}

type TipSubset

type TipSubset struct {
	Mask    []bool
	TipType string
	Channel *wtype.LHChannelParameter
}

type TipType

type TipType int

TipType types of tips used by liquid handlers

const (
	DisposableTips              TipType = iota // disposable system	-- needs tip boxes & waste
	FixedTips                                  // fixed tip system	-- needs tip wash
	MixedDisposableAndFixedTips                // both disposable and mixed	-- needs all of the above
	NoTips                                     // does not use tips
)

func (TipType) IsValid

func (tt TipType) IsValid() bool

func (TipType) String

func (tt TipType) String() string

type TransferBlockInstruction

type TransferBlockInstruction struct {
	BaseRobotInstruction
	*InstructionType
	Inss []*wtype.LHInstruction
}

func NewTransferBlockInstruction

func NewTransferBlockInstruction(inss []*wtype.LHInstruction) *TransferBlockInstruction

func (TransferBlockInstruction) Generate

func (TransferBlockInstruction) GetParameter

func (ti TransferBlockInstruction) GetParameter(name InstructionParameter) interface{}

func (*TransferBlockInstruction) Visit

type TransferInstruction

type TransferInstruction struct {
	BaseRobotInstruction
	*InstructionType
	Platform  string
	Transfers []MultiTransferParams
}

func ConvertInstructions

func ConvertInstructions(ctx context.Context, inssIn LHIVector, robot *LHProperties, channelprms *wtype.LHChannelParameter, multi int, legacyVolume bool, policy *wtype.LHPolicyRuleSet) ([]*TransferInstruction, error)

func NewTransferInstruction

func NewTransferInstruction(what, pltfrom, pltto, wellfrom, wellto, fplatetype, tplatetype []string, volume, fvolume, tvolume []wunit.Volume, FPlateWX, FPlateWY, TPlateWX, TPlateWY []int, Components []string, policies []wtype.LHPolicy) *TransferInstruction

func (*TransferInstruction) Add

func (*TransferInstruction) CheckMultiPolicies

func (ins *TransferInstruction) CheckMultiPolicies(which int) bool

func (ins *TransferInstruction) getPoliciesForTransfer(which int, ruleSet wtype.LHPolicyRuleSet) []wtype.LHPolicy { }

func (*TransferInstruction) Dup

what, pltfrom, pltto, wellfrom, wellto, fplatetype, tplatetype []string, volume, fvolume, tvolume []wunit.Volume, FPlateWX, FPlateWY, TPlateWX, TPlateWY []int, Components []string

func (*TransferInstruction) Generate

func (*TransferInstruction) GetParallelSetsFor

func (ins *TransferInstruction) GetParallelSetsFor(ctx context.Context, robot *LHProperties, policy wtype.LHPolicy) ([]bool, []*wtype.LHChannelParameter)

func (*TransferInstruction) GetParameter

func (ins *TransferInstruction) GetParameter(name InstructionParameter) interface{}

func (*TransferInstruction) MergeWith

func (*TransferInstruction) OutputTo

func (ins *TransferInstruction) OutputTo(drv LiquidhandlingDriver) error

func (*TransferInstruction) ParamSet

func (*TransferInstruction) ReviseTransferVolumes

func (ins *TransferInstruction) ReviseTransferVolumes(prms *LHProperties) error

func (*TransferInstruction) ToString

func (ti *TransferInstruction) ToString() string

func (*TransferInstruction) Visit

func (ins *TransferInstruction) Visit(visitor RobotInstructionVisitor)

type TransferParams

type TransferParams struct {
	What       string                    // liquid class
	PltFrom    string                    // from position
	PltTo      string                    // to position
	WellFrom   string                    // well coordinate in from plate
	WellTo     string                    // well coordinate in to plate
	Volume     wunit.Volume              // volume of sample being transferred
	FPlateType string                    // from plate type
	TPlateType string                    // to plate type
	FVolume    wunit.Volume              // volume in 'from' well
	TVolume    wunit.Volume              // volume in 'to' well
	Channel    *wtype.LHChannelParameter // which channel to use
	TipType    string                    // type of tip to use
	FPlateWX   int                       // X dimension in 'from' plate
	FPlateWY   int                       // Y dimension in 'from' plate
	TPlateWX   int                       // X dimension in 'to' plate
	TPlateWY   int                       // Y dimension in 'to' plate
	Component  string                    // component type
	Policy     wtype.LHPolicy            // policy attached to this transfer
}

func (TransferParams) Dup

func (tp TransferParams) Dup() TransferParams

func (TransferParams) IsZero

func (tp TransferParams) IsZero() bool

func (TransferParams) ToString

func (tp TransferParams) ToString() string

type UnloadAdaptorInstruction

type UnloadAdaptorInstruction struct {
	BaseRobotInstruction
	*InstructionType
	What       []string
	PltFrom    []string
	PltTo      []string
	WellFrom   []string
	WellTo     []string
	Volume     []wunit.Volume
	FPlateType []string
	TPlateType []string
	FVolume    wunit.Volume
	TVolume    wunit.Volume
	Prms       *wtype.LHChannelParameter
}

func NewUnloadAdaptorInstruction

func NewUnloadAdaptorInstruction() *UnloadAdaptorInstruction

func (*UnloadAdaptorInstruction) Generate

func (*UnloadAdaptorInstruction) GetParameter

func (ins *UnloadAdaptorInstruction) GetParameter(name InstructionParameter) interface{}

func (*UnloadAdaptorInstruction) OutputTo

func (ins *UnloadAdaptorInstruction) OutputTo(lhdriver LiquidhandlingDriver) error

func (*UnloadAdaptorInstruction) Visit

type UnloadTipsInstruction

type UnloadTipsInstruction struct {
	BaseRobotInstruction
	*InstructionType
	Head       int
	Channels   []int
	TipType    []string
	HolderType []string
	Multi      int
	Pos        []string
	Well       []string
	Platform   string
}

func NewUnloadTipsInstruction

func NewUnloadTipsInstruction() *UnloadTipsInstruction

func (*UnloadTipsInstruction) Generate

func (*UnloadTipsInstruction) GetParameter

func (ins *UnloadTipsInstruction) GetParameter(name InstructionParameter) interface{}

func (*UnloadTipsInstruction) OutputTo

func (ins *UnloadTipsInstruction) OutputTo(lhdriver LiquidhandlingDriver) error

func (*UnloadTipsInstruction) Visit

func (ins *UnloadTipsInstruction) Visit(visitor RobotInstructionVisitor)

type UnloadTipsMoveInstruction

type UnloadTipsMoveInstruction struct {
	BaseRobotInstruction
	*InstructionType
	Head       int
	PltTo      []string
	WellTo     []string
	TPlateType []string
	Multi      int
	Platform   string
}

func NewUnloadTipsMoveInstruction

func NewUnloadTipsMoveInstruction() *UnloadTipsMoveInstruction

func (*UnloadTipsMoveInstruction) Generate

func (*UnloadTipsMoveInstruction) GetParameter

func (ins *UnloadTipsMoveInstruction) GetParameter(name InstructionParameter) interface{}

func (*UnloadTipsMoveInstruction) Visit

type UserPlate

type UserPlate struct {
	Plate    *wtype.Plate
	Position string
}

type UserPlates

type UserPlates []UserPlate

type VolumeSet

type VolumeSet []wunit.Volume

func NewVolumeSet

func NewVolumeSet(n int) VolumeSet

func TransferVolumesMulti

func TransferVolumesMulti(vols VolumeSet, chans []*wtype.LHChannelParameter) ([]VolumeSet, error)

TransferVolumesMulti given a slice of volumes to transfer and channels to use, return an array of transfers to make such that `ret[i][j]` is the volume of the ith transfer to be made with channel j

func (VolumeSet) Add

func (vs VolumeSet) Add(v wunit.Volume)

Add behaves inconsistently with Sub... this is a design error

func (VolumeSet) AddA

func (vs VolumeSet) AddA(vs2 VolumeSet)

add two volume sets

func (VolumeSet) Dup

func (vs VolumeSet) Dup() VolumeSet

func (VolumeSet) GetACopy

func (vs VolumeSet) GetACopy() VolumeSet

func (VolumeSet) IsZero

func (vs VolumeSet) IsZero() bool

func (VolumeSet) MaxMultiTransferVolume

func (vs VolumeSet) MaxMultiTransferVolume(minLeave wunit.Volume) wunit.Volume

func (VolumeSet) Min

func (vs VolumeSet) Min() wunit.Volume

func (VolumeSet) NonContiguous

func (vols VolumeSet) NonContiguous() bool

NonContiguous looks for volumes of the pattern X 0+ Y where X, Y are non zero. These are incompatible with non-independent volume heads

func (VolumeSet) NonZeros

func (vs VolumeSet) NonZeros() VolumeSet

func (VolumeSet) Positive

func (vs VolumeSet) Positive() VolumeSet

Positive return a filtered VolumeSet containing only volumes that are positive

func (VolumeSet) SetEqualTo

func (vs VolumeSet) SetEqualTo(v wunit.Volume, multi int)

func (VolumeSet) Sub

func (vs VolumeSet) Sub(v wunit.Volume) VolumeSet

func (VolumeSet) SubA

func (vs VolumeSet) SubA(vs2 VolumeSet)

type WaitInstruction

type WaitInstruction struct {
	BaseRobotInstruction
	*InstructionType
	Time float64
}

func NewWaitInstruction

func NewWaitInstruction() *WaitInstruction

func (*WaitInstruction) Generate

func (ins *WaitInstruction) Generate(ctx context.Context, policy *wtype.LHPolicyRuleSet, prms *LHProperties) ([]RobotInstruction, error)

func (*WaitInstruction) GetParameter

func (ins *WaitInstruction) GetParameter(name InstructionParameter) interface{}

func (*WaitInstruction) OutputTo

func (ins *WaitInstruction) OutputTo(lhdriver LiquidhandlingDriver) error

func (*WaitInstruction) Visit

func (ins *WaitInstruction) Visit(visitor RobotInstructionVisitor)

Jump to

Keyboard shortcuts

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