mixer

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

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// DefaultOpt is the default Mixer Opt
	DefaultOpt = Opt{
		MaxPlates:            &defaultMaxPlates,
		MaxWells:             &defaultMaxWells,
		ResidualVolumeWeight: &defaultResidualVolumeWeight,
		PlanningVersion:      "ep2",
		LegacyVolume:         true,
		FixVolumes:           true,
	}
)

Functions

func MarshalPlateCSV

func MarshalPlateCSV(plate *wtype.Plate) ([]byte, error)

MarshalPlateCSV writes a plate to a CSV file

func ParseInputPlateFile

func ParseInputPlateFile(ctx context.Context, filename string) (*wtype.Plate, error)

ParseInputPlateFile is convenience function for parsing a plate from file. Will splat out warnings to stdout.

Types

type Mixer

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

A Mixer is a device plugin for mixer devices

func New

func New(opt Opt, d driver.LiquidhandlingDriver) (*Mixer, error)

New creates a new Mixer

func (*Mixer) CanCompile

func (a *Mixer) CanCompile(req ast.Request) bool

CanCompile implements a Device

func (*Mixer) Compile

func (a *Mixer) Compile(ctx context.Context, nodes []ast.Node) ([]ast.Inst, error)

Compile implements a Device

func (*Mixer) FileType

func (a *Mixer) FileType() (ftype string)

FileType returns the file type for generated files

func (*Mixer) String

func (a *Mixer) String() string

type Opt

type Opt struct {
	MaxPlates            *float64 `json:"maxPlates,omitempty"`
	MaxWells             *float64 `json:"maxWells,omitempty"`
	ResidualVolumeWeight *float64 `json:"residualVolumeWeight,omitempty"`
	InputPlateTypes      []string `json:"inputPlateTypes,omitempty"`
	OutputPlateTypes     []string `json:"outputPlateTypes,omitempty"`
	TipTypes             []string `json:"tipTypes,omitempty"`
	PlanningVersion      string   `json:"executionPlannerVersion,omitempty"`

	// Two methods of populating input plates
	InputPlateData [][]byte       `json:"inputPlateData,omitempty"` // From contents of files
	InputPlates    []*wtype.Plate `json:"inputPlates,omitempty"`    // Directly

	// Direct specification of output plates
	OutputPlates []*wtype.Plate `json:"outputPlates,omitempty"`

	// Specify file name in the instruction stream of any driver generated file
	DriverOutputFileName string `json:"driverOutputFileName,omitempty"`

	// Driver specific options. Semantics are not stable. Will need to be
	// revised when multi device execution is supported.
	DriverSpecificInputPreferences    []string `json:"driverSpecificInputPreferences,omitempty"`
	DriverSpecificOutputPreferences   []string `json:"driverSpecificOutputPreferences,omitempty"`
	DriverSpecificTipPreferences      []string `json:"driverSpecificTipPreferences,omitempty"` // Driver specific position names (e.g., position_1 or A2)
	DriverSpecificTipWastePreferences []string `json:"driverSpecificTipWastePreferences,omitempty"`
	DriverSpecificWashPreferences     []string `json:"driverSpecificWashPreferences,omitempty"`

	ModelEvaporation         bool `json:"modelEvaporation"`
	OutputSort               bool `json:"outputSort"`
	PrintInstructions        bool `json:"printInstructions"`
	UseDriverTipTracking     bool `json:"useDriverTipTracking"`
	LegacyVolume             bool `json:"legacyVolume"`             // Don't track volumes for intermediates
	FixVolumes               bool `json:"fixVolumes"`               // Aim to revise requested volumes to service requirements
	IgnorePhysicalSimulation bool `json:"ignorePhysicalSimulation"` //ignore errors in physical simulation

	// Two ways to set user liquid policies rule set
	CustomPolicyData    map[string]wtype.LHPolicy `json:"customPolicyData,omitempty"`    // Set rule set from policies
	CustomPolicyRuleSet *wtype.LHPolicyRuleSet    `json:"customPolicyRuleSet,omitempty"` // Directly
}

Opt are options for a Mixer

func (Opt) Merge

func (a Opt) Merge(x *Opt) Opt

Merge two configs together and return the result. Values in the argument override those in the receiver.

type ParsePlateResult

type ParsePlateResult struct {
	Plate    *wtype.Plate
	Warnings []string
}

ParsePlateResult is the result of parsing a plate

func ParsePlateCSV

func ParsePlateCSV(ctx context.Context, inData io.Reader, validationOptions ...ValidationConfig) (*ParsePlateResult, error)

ParsePlateCSV parses a csv file into a plate. ValidationConfig options may be added which either: (i) define sets of valid and invalid characters which may be used in the component names. (ii) define fields in the Plate csv which may be replaced. If no config is set for case (i) a default config will be used.

CSV plate format: (? denotes optional, whitespace for clarity)

<plate type ?> , <plate name ?>
<well0> , <component name0> , <component type0 ?> , <volume0 ?> , <volume unit0 ?>, <conc0 ?> , <conc unit0 ?>, <SubComponent1Name: ?> , <SubComponent1Conc unit0 ?>, <SubComponent2Name: ?> , <SubComponent2Conc unit0 ?>, <SubComponentNName: ?> , <SubComponentNConc unit0 ?>
<well1> , <component name1> , <component type1 ?> , <volume1 ?> , <volume unit1 ?>, <conc1 ?> , <conc unit1 ?>, <SubComponent1Name: ?> , <SubComponent1Conc unit0 ?>, <SubComponent2Name: ?> , <SubComponent2Conc unit0 ?>, <SubComponentNName: ?> , <SubComponentNConc unit0 ?>
...

type ValidationConfig

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

ValidationConfig specifies how to parse a plate

func DefaultValidationConfig

func DefaultValidationConfig() ValidationConfig

DefaultValidationConfig is the default validation config

func PermissiveValidationConfig

func PermissiveValidationConfig() ValidationConfig

PermissiveValidationConfig is a looser validation config

func ReplacePlateType

func ReplacePlateType(replacement string) ValidationConfig

ReplacePlateType will replace the plate type in the CSV file with the replacement option specified.

func (ValidationConfig) InvalidChars

func (vc ValidationConfig) InvalidChars() string

InvalidChars are the characters that are invalid in a component name

func (ValidationConfig) ValidChars

func (vc ValidationConfig) ValidChars() string

ValidChars are the characters that are valid in a component name

Jump to

Keyboard shortcuts

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