Documentation ¶
Overview ¶
defines types for dealing with liquid handling requests
Index ¶
- Constants
- func Asset(name string) ([]byte, error)
- func AssetDigest(name string) ([sha256.Size]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func AssetString(name string) (string, error)
- func BasicSetupAgent(ctx context.Context, request *LHRequest, params *liquidhandling.LHProperties) error
- func Digests() (map[string][sha256.Size]byte, error)
- func FixVolumes(request *LHRequest, carryVolume wunit.Volume) error
- func ImprovedLayoutAgent(ctx context.Context, request *LHRequest, params *liquidhandling.LHProperties) error
- func MustAsset(name string) []byte
- func MustAssetString(name string) string
- func OrdinalFromHash(m map[string]int) ([]string, error)
- func OutputSetup(robot *liquidhandling.LHProperties)
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- func SummarizeActions(initialState *driver.LHProperties, itree *driver.ITree) ([]byte, error)
- func SummarizeLayout(initialState, finalState *driver.LHProperties, ...) ([]byte, error)
- type ByOrdinal
- type InputSolutions
- type InputSorter
- type LHOptions
- type LHPolicyManager
- type LHRequest
- func (lhr *LHRequest) AddUserPlate(p *wtype.Plate)
- func (lhr *LHRequest) AddUserPolicies(userPolicies *wtype.LHPolicyRuleSet)
- func (lhr *LHRequest) Add_instruction(ins *wtype.LHInstruction)
- func (request *LHRequest) AllPlates() []*wtype.Plate
- func (self *LHRequest) GetOrderedLHInstructions() ([]*wtype.LHInstruction, error)
- func (req *LHRequest) GetPlate(id string) (*wtype.Plate, bool)
- func (lhr *LHRequest) GetPolicyManager() *LHPolicyManager
- func (req *LHRequest) GetSolutionsFromInputPlates() (map[string][]*wtype.Liquid, error)
- func (request *LHRequest) HasPlateNamed(name string) bool
- func (req *LHRequest) MergedInputOutputPlates() map[string]*wtype.Plate
- func (lhr *LHRequest) NewComponentsAdded() bool
- func (request *LHRequest) OrderedInputPlates() []*wtype.Plate
- func (request *LHRequest) OrderedOutputPlates() []*wtype.Plate
- func (lhr *LHRequest) Policies() *wtype.LHPolicyRuleSet
- func (lhr *LHRequest) SetPolicies(systemPolicies *wtype.LHPolicyRuleSet)
- func (lhr *LHRequest) UseLegacyVolume() bool
- func (request *LHRequest) Validate() error
- type Liquidhandler
- func (this *Liquidhandler) AddSetupInstructions(request *LHRequest) error
- func (this *Liquidhandler) Execute(request *LHRequest) error
- func (this *Liquidhandler) GetPlates(ctx context.Context, plates map[string]*wtype.Plate, ...) (map[string]*wtype.Plate, error)
- func (this *Liquidhandler) Layout(ctx context.Context, request *LHRequest) error
- func (this *Liquidhandler) MakeSolutions(ctx context.Context, request *LHRequest) error
- func (this *Liquidhandler) Plan(ctx context.Context, request *LHRequest) error
- func (this *Liquidhandler) PlateIDMap() map[string]string
- func (this *Liquidhandler) Setup(ctx context.Context, request *LHRequest) error
- func (this *Liquidhandler) Simulate(request *LHRequest) error
- type PlateChoice
Constants ¶
const ( COLWISE = iota ROWWISE RANDOM )
const ( LayoutSummaryVersion = "1.0" ActionsSummaryVersion = "1.0" )
Variables ¶
This section is empty.
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDigest ¶
AssetDigest returns the digest of the file with the given name. It returns an error if the asset could not be found or the digest could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"}, AssetDir("data/img") would return []string{"a.png", "b.png"}, AssetDir("foo.txt") and AssetDir("notexist") would return an error, and AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetString ¶
AssetString returns the asset contents as a string (instead of a []byte).
func BasicSetupAgent ¶
func BasicSetupAgent(ctx context.Context, request *LHRequest, params *liquidhandling.LHProperties) error
default setup agent
func FixVolumes ¶
FixVolumes adjusts volumes of components in instructions in order to ensure sufficient quantities for all known uses. It aims to account for both residual well volumes and carry volumes, although the latter is intrinsically inaccurate since at this stage we do not know how transfers will be done and therefore how much carry volume will be lost In order to do this it needs to account for the various conventions in component naming to distinguish virtual from non-virtual components and additionally needs to ensure it treats stationary components differently since these do not need adjusting for carry volume or residual
func ImprovedLayoutAgent ¶
func ImprovedLayoutAgent(ctx context.Context, request *LHRequest, params *liquidhandling.LHProperties) error
ImprovedLayoutAgent assigns destinations to mix instructions don't ask about how bad the original one (upon which the 'improvements' here were made) was...
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func MustAssetString ¶
MustAssetString is like AssetString but panics when Asset would return an error. It simplifies safe initialization of global variables.
func OutputSetup ¶
func OutputSetup(robot *liquidhandling.LHProperties)
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory.
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively.
func SummarizeActions ¶
SummarizeActions return a description of all the steps which take place during the liquidhandling operation The returned JSON is validated against the schema found in ./schemas/actions.schema.json, which is the cannonical description of the format for communication liquidhandling actions to the frontend initialState: the initial state of the robot, used to track state updates itree: the instruction tree generated during the Plan(...) stage errors are returned if the json cannot be constructed or the result fails to validate
func SummarizeLayout ¶
func SummarizeLayout(initialState, finalState *driver.LHProperties, initialToFinalIDs map[string]string) ([]byte, error)
SummarizeLayout produce a description of the positions and states of objects on deck before and after the entire liquidhandling operation The returned JSON is validated against the schema found in ./schemas/layout.schema.json, which is the cannonical description of the format for communicating layout to the front end. initialState and finalState are the robot states before and after the operation, initialToFinalIDs maps object ids in the inisial state to the final state errors are returned if the json cannot be constructed or the result fails to validate
Types ¶
type InputSolutions ¶
type InputSolutions struct { Solutions map[string][]*wtype.Liquid //the solutions explicitly supplied to the protocol Order []string //the order in which liquids are required in the ordered LH instructions VolumesSupplied map[string]wunit.Volume //the volumes of the solutions explicitly supplied to the protocol VolumesRequired map[string]wunit.Volume //the estimated volumes of solutions required to carry out the protocol VolumesWanting map[string]wunit.Volume //the estimated shortfall between the supplied and required volumes which must be auto-allocated }
InputSolutions properties to do with the input Liquids required for the mix
func (*InputSolutions) String ¶
func (self *InputSolutions) String() string
String return a string representation, useful for debugging
type InputSorter ¶
func (InputSorter) Less ¶
func (is InputSorter) Less(i, j int) bool
func (InputSorter) Swap ¶
func (is InputSorter) Swap(i, j int)
type LHOptions ¶
type LHOptions struct { ModelEvaporation bool OutputSort bool ExecutionPlannerVersion string PrintInstructions bool LegacyVolume bool FixVolumes bool IgnorePhysicalSimulation bool }
func NewLHOptions ¶
func NewLHOptions() LHOptions
type LHPolicyManager ¶
type LHPolicyManager struct { SystemPolicies *wtype.LHPolicyRuleSet UserPolicies *wtype.LHPolicyRuleSet }
func (*LHPolicyManager) MergePolicies ¶
func (mgr *LHPolicyManager) MergePolicies(protocolpolicies *wtype.LHPolicyRuleSet) *wtype.LHPolicyRuleSet
func (*LHPolicyManager) Policies ¶
func (mgr *LHPolicyManager) Policies() *wtype.LHPolicyRuleSet
func (*LHPolicyManager) SetOption ¶
func (mgr *LHPolicyManager) SetOption(optname string, value interface{}) error
SetOption adds an option and value to both System and User policies in the PolicyManager.
type LHRequest ¶
type LHRequest struct { ID string BlockID wtype.BlockID BlockName string LHInstructions wtype.LHInstructions Plates map[string]*wtype.Plate TipBoxes []*wtype.LHTipbox InstructionTree *liquidhandling.ITree Instructions []liquidhandling.TerminalRobotInstruction InstructionText string InputAssignments map[string][]string OutputAssignments map[string][]string InputPlates map[string]*wtype.Plate OutputPlates map[string]*wtype.Plate InputPlatetypes []*wtype.Plate InputPlateOrder []string InputSetupWeights map[string]float64 OutputPlatetypes []*wtype.Plate OutputPlateOrder []string PlateLookup map[string]string Stockconcs map[string]wunit.Concentration PolicyManager *LHPolicyManager OutputOrder []string OutputIteratorFactory func(wtype.Addressable) wtype.AddressIterator `json:"-"` InstructionChain *wtype.IChain TimeEstimate float64 // in seconds InstructionSets [][]*wtype.LHInstruction Options LHOptions NUserPlates int OutputSort bool TipsUsed []wtype.TipEstimate InputSolutions *InputSolutions //store properties related to the Liquids for the request }
structure for defining a request to the liquid handler
func NewLHRequest ¶
func NewLHRequest() *LHRequest
func (*LHRequest) AddUserPlate ¶
func (*LHRequest) AddUserPolicies ¶
func (lhr *LHRequest) AddUserPolicies(userPolicies *wtype.LHPolicyRuleSet)
AddUserPolicies allows policies specified in elements to be added to the PolicyManager.
func (*LHRequest) Add_instruction ¶
func (lhr *LHRequest) Add_instruction(ins *wtype.LHInstruction)
func (*LHRequest) AllPlates ¶
AllPlates returns a list of all known plates, in the order input plates, output plates ordering will be as within the stated orders of each
func (*LHRequest) GetOrderedLHInstructions ¶
func (self *LHRequest) GetOrderedLHInstructions() ([]*wtype.LHInstruction, error)
GetOrderedLHInstructions get the LHInstructions in the order which should have previously been detrmined
func (*LHRequest) GetPolicyManager ¶
func (lhr *LHRequest) GetPolicyManager() *LHPolicyManager
func (*LHRequest) GetSolutionsFromInputPlates ¶
GetSolutionsFromInputPlates get all the solutions available to the mix task in the input plates
func (*LHRequest) HasPlateNamed ¶
HasPlateNamed checks if the request already contains a plate with the specified name
func (*LHRequest) MergedInputOutputPlates ¶
func (*LHRequest) NewComponentsAdded ¶
NewComponentsAdded run this after Plan to determine if anything new was added to the inputs
func (*LHRequest) OrderedInputPlates ¶
OrderedInputPlates returns the list of input plates in order
func (*LHRequest) OrderedOutputPlates ¶
OrderedOutputPlates returns the list of input plates in order
func (*LHRequest) Policies ¶
func (lhr *LHRequest) Policies() *wtype.LHPolicyRuleSet
func (*LHRequest) SetPolicies ¶
func (lhr *LHRequest) SetPolicies(systemPolicies *wtype.LHPolicyRuleSet)
func (*LHRequest) UseLegacyVolume ¶
type Liquidhandler ¶
type Liquidhandler struct { Properties *liquidhandling.LHProperties FinalProperties *liquidhandling.LHProperties SetupAgent func(context.Context, *LHRequest, *liquidhandling.LHProperties) error LayoutAgent func(context.Context, *LHRequest, *liquidhandling.LHProperties) error // contains filtered or unexported fields }
func Init ¶
func Init(properties *liquidhandling.LHProperties) *Liquidhandler
initialize the liquid handling structure
func (*Liquidhandler) AddSetupInstructions ¶
func (this *Liquidhandler) AddSetupInstructions(request *LHRequest) error
AddSetupInstructions add instructions to the instruction stream to setup the plate layout of the machine
func (*Liquidhandler) Execute ¶
func (this *Liquidhandler) Execute(request *LHRequest) error
run the request via the driver
func (*Liquidhandler) GetPlates ¶
func (this *Liquidhandler) GetPlates(ctx context.Context, plates map[string]*wtype.Plate, major_layouts map[int][]string, ptype *wtype.Plate) (map[string]*wtype.Plate, error)
define which labware to use
func (*Liquidhandler) Layout ¶
func (this *Liquidhandler) Layout(ctx context.Context, request *LHRequest) error
generate the output layout
func (*Liquidhandler) MakeSolutions ¶
func (this *Liquidhandler) MakeSolutions(ctx context.Context, request *LHRequest) error
high-level function which requests planning and execution for an incoming set of solutions
func (*Liquidhandler) Plan ¶
func (this *Liquidhandler) Plan(ctx context.Context, request *LHRequest) error
func (*Liquidhandler) PlateIDMap ¶
func (this *Liquidhandler) PlateIDMap() map[string]string
func (*Liquidhandler) Setup ¶
func (this *Liquidhandler) Setup(ctx context.Context, request *LHRequest) error
generate setup for the robot
func (*Liquidhandler) Simulate ¶
func (this *Liquidhandler) Simulate(request *LHRequest) error
run the request via the physical simulator
type PlateChoice ¶
type PlateChoice struct { Platetype string Assigned []string ID string Wells []string Name string Output []bool }
func LayoutStage ¶
func LayoutStage(ctx context.Context, request *LHRequest, params *liquidhandling.LHProperties, chain *wtype.IChain, plate_choices []PlateChoice, mapchoices map[string]string) ([]PlateChoice, map[string]string, error)