wtype

package
Version: 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, BSD-3-Clause, GPL-2.0 Imports: 26 Imported by: 0

Documentation

Overview

defines types for dealing with liquid handling requests

defines types for dealing with liquid handling requests

defines types for dealing with liquid handling requests

solutions is a utility package for working with solutions of LHComponents

Package wtype contains core Antha types

Index

Constants

View Source
const (
	ORF           = "ORF"
	CDS           = "CDS"
	GENE          = "gene"
	MISC_FEATURE  = "misc_feature"
	PROMOTER      = "promoter"
	TRNA          = "tRNA"
	RRNA          = "rRNA"
	NCRNA         = "ncRNA"
	REGULATORY    = "regulatory"
	REPEAT_REGION = "repeat_region"
)

feature class options based on genbank conventions

View Source
const (
	// Option to feed into coordinates method.
	// HUMANFRIENDLY returns a sequence PositionPair's start and end positions in a human friendly format
	// i.e. in a Sequence "ATGTGTTG" position 1 is A, 2 is T.
	HUMANFRIENDLY = "humanFriendly"

	// Option to feed into coordinates method.
	// CODEFRIENDLY returns a sequence PositionPair's start and end positions in a code friendly format
	// i.e. in a Sequence "ATGTGTTG" position 0 is A, 1 is T.
	CODEFRIENDLY = "codeFriendly"

	// Option to feed into coordinates method.
	// IGNOREDIRECTION is a constant to specify that direction of a feature position
	// should be ignored when returning start and end positions of a feature.
	// If selected, the start position will be the first position at which the feature is encountered regardless of orientation.
	IGNOREDIRECTION = "ignoreDirection"
)
View Source
const (
	// PolicyNameField returns the map entry of a liquid policy corresponding to the name of the policy.
	PolicyNameField string = "POLICYNAME"

	// PolicyNameField returns the map entry of a liquid policy corresponding to the name of the policy.
	PolicyDescriptionField string = "DESCRIPTION"

	// LiquidClass is the name of the liquid type checked at instruction generation.
	// Currently this is analogous to the POLICYNAME
	LiquidClass string = "LIQUIDCLASS"

	// This value will be used for aspirating, dispensing and mixing.
	DefaultPipetteSpeed string = "DEFAULTPIPETTESPEED"
)
View Source
const (
	NEITHER = 0
	// Top strand, or coding strand
	TOP = 1
	// Bottom strand, or complimentary strand.
	BOTTOM = 2
)

Options for Strand choice

View Source
const (
	LH_OK = iota
	LH_ERR_NO_DECK_SPACE
	LH_ERR_NO_TIPS
	LH_ERR_NOT_IMPLEMENTED
	LH_ERR_CONC
	LH_ERR_DRIV
	LH_ERR_POLICY
	LH_ERR_VOL
	LH_ERR_DIRE
	LH_ERR_OTHER
	LH_ERR_TIP_WASTE
)
View Source
const (
	LHIMIX = iota
	LHIPRM
	LHISPL
)
View Source
const (
	LHP_AND int = iota
	LHP_OR
)
View Source
const (
	BYROW    = true
	BYCOLUMN = false
)
View Source
const DefaultLHPolicy = LTDefault

DefaultLHPolicy which will be used if no policy is set.

View Source
const (
	FORCE bool = true // Optional parameter to use in AddDNASequence method to override error check preventing addition of a duplicate sequence.
)
View Source
const InPlaceMarker = "-INPLACE"
View Source
const SEQSKEY = "DNASequences"
View Source
const SubComponentsHeader = "SubComponents"

SubComponentsHeader is the header found to be used in the plate CSV files to specify Sub components of liquids.

Variables

View Source
var (
	TAXLINE = regexp.MustCompile(`^taxid\s+(\d+)`)
	CODLINE = regexp.MustCompile(`^([ACTG]{3,3})\s+([A-Z*])\s+(\d+)\s+([0-9.]+)`)
)
View Source
var (
	Globals = LHGlobals{
		MIN_REASONABLE_VOLUME_UL: 0.01,
		VOL_RESOLUTION_DIGITS:    2,
	}

	MAGICBARRIERPROMPTSTRING = "___BARRIER___"
)
View Source
var (
	OnSmartMix  = categoricCondition{"LIQUIDCLASS", "SmartMix"}
	OnPostMix   = categoricCondition{"LIQUIDCLASS", "PostMix"}
	OnPreMix    = categoricCondition{"LIQUIDCLASS", "PreMix"}
	OnNeedToMix = categoricCondition{"LIQUIDCLASS", "NeedToMix"}
	OnMegaMix   = categoricCondition{"LIQUIDCLASS", "MegaMix"}
)

Conditions to apply to LHpolicyRules based on liquid policy used

View Source
var (
	IntoEmpty                 = numericCondition{Class: "WELLTOVOLUME", Range: conditionRange{Lower: 0.0, Upper: 0.009}}
	IntoLessThan20ul          = numericCondition{Class: "WELLTOVOLUME", Range: conditionRange{Lower: 0.01, Upper: 20.0}}
	IntoBetween20ulAnd50ul    = numericCondition{Class: "WELLTOVOLUME", Range: conditionRange{20.1, 50.0}}
	IntoBetween50ulAnd100ul   = numericCondition{Class: "WELLTOVOLUME", Range: conditionRange{50.1, 100.0}}
	IntoBetween100ulAnd200ul  = numericCondition{Class: "WELLTOVOLUME", Range: conditionRange{100.1, 200.0}}
	IntoBetween200ulAnd1000ul = numericCondition{Class: "WELLTOVOLUME", Range: conditionRange{200.1, 1000.0}}
)

Conditions to apply to LHpolicyRules based on volume of liquid that a sample is being pipetted into at the destination well

View Source
var (
	LessThan20ul        = numericCondition{Class: "VOLUME", Range: conditionRange{0.0, 20.0}}
	GreaterThan20ul     = numericCondition{Class: "VOLUME", Range: conditionRange{20.1, 1000.0}}
	Between20ulAnd200ul = numericCondition{Class: "VOLUME", Range: conditionRange{20.01, 200.0}}
)

Conditions to apply to LHpolicyRules based on volume of liquid being transferred

View Source
var (
	FromBetween100ulAnd200ul  = numericCondition{Class: "WELLFROMVOLUME", Range: conditionRange{100.0, 200.0}}
	FromBetween200ulAnd1000ul = numericCondition{Class: "WELLFROMVOLUME", Range: conditionRange{200.1, 1000.0}}
)

Conditions to apply to LHpolicyRules based on volume of liquid in source well from which a sample is taken

View Source
var (
	UnknownShape   = (*shapeType)(nil)
	CylinderShape  = newShapeType("cylinder", true)
	CircleShape    = newShapeType("circle", true)
	RoundShape     = newShapeType("round", true)
	SphereShape    = newShapeType("sphere", true)
	SquareShape    = newShapeType("square", false)
	BoxShape       = newShapeType("box", false)
	RectangleShape = newShapeType("rectangle", false)
	TrapezoidShape = newShapeType("trapezoid", false)
)
View Source
var (
	CONSTRAINTMARKER = "constraint-"
)
View Source
var DefaultPolicies map[string]LHPolicy = MakePolicies()
View Source
var GLOBALCARRYVOLUME wunit.Volume = wunit.NewVolume(0.5, "ul")
View Source
var InsNames = []string{"MIX", "PROMPT", "SPLIT"}
View Source
var NotFoundError = errors.New("not found")
View Source
var SBSFootprint = Coordinates2D{X: 127.76, Y: 85.48}

SBSFootprint the size of standard SBS format plates

View Source
var WellBottomNames []string = []string{"flat", "U", "V"}

Functions

func A1ArrayFromWellCoords

func A1ArrayFromWellCoords(arr []WellCoords) []string

func A1ArrayFromWells

func A1ArrayFromWells(wells []*LHWell) []string

func AddSubComponent

func AddSubComponent(component *Liquid, subcomponent *Liquid, conc wunit.Concentration) error

AddSubComponent adds a subcomponent with concentration to a component. An error is returned if subcomponent is already found.

func AddSubComponents

func AddSubComponents(component *Liquid, allsubComponents ComponentList) error

AddSubComponents adds a component list to a component. If a conflicting sub component concentration is already present then an error will be returned. To overwrite all subcomponents ignoring conficts, use OverWriteSubComponents.

func ChannelWells

func ChannelWells(prm LHChannelParameter, plt Plate, wellsfrom []string) []string

func ChannelsUsed

func ChannelsUsed(wf []string) []bool

func ClassOf

func ClassOf(o interface{}) string

ClassOf

func Comp

func Comp(s string) string

func CompareStringWellCoordsCol

func CompareStringWellCoordsCol(sw1, sw2 string) int

func CompareStringWellCoordsRow

func CompareStringWellCoordsRow(sw1, sw2 string) int

func CompareWellCoordsCol

func CompareWellCoordsCol(w1, w2 WellCoords) int

func CompareWellCoordsRow

func CompareWellCoordsRow(w1, w2 WellCoords) int

func CopyRulesFromPolicy

func CopyRulesFromPolicy(ruleSet *LHPolicyRuleSet, policyToCopyRulesFrom, policyToCopyRulesTo string) (err error)

CopyRulesFromPolicy will copy all instances of rules which mention tthe liquid class policyToCopyRulesFrom into duplicate rules set on policyToCopyRulesTo.

func EqualLists

func EqualLists(list1, list2 ComponentList) error

EqualLists compares two ComponentLists and returns an error if the lists are not identical.

func EquivalentPolicies

func EquivalentPolicies(policy1, policy2 LHPolicy) bool

EquivalentPolicies checks for equality of two policies. We're being conservative here. It's possible that at the point at which low level instructions are generated that two policies of different length will be actioned in exactly the same way. Since we cannot guarantee this at this point, we'll say they're not equivalent.

func ErrorDesc

func ErrorDesc(code int) string

func ErrorName

func ErrorName(code int) string

func FirstIndexInStrArray

func FirstIndexInStrArray(s string, a []string) int

func GetUUID

func GetUUID() string

this package wraps the uuid library appropriately by generating a V4 UUID

func HumanizeWellCoords

func HumanizeWellCoords(coords []WellCoords) string

HumanizeWellCoords convenience function to make displaying a slice of WellCoords more human readable

func IDOf

func IDOf(o interface{}) string

IDOf

func IndexOfString

func IndexOfString(query string, pa *[]string) int

func IndexOfStringArray

func IndexOfStringArray(s string, a []string) int

func Initialize_Wells

func Initialize_Wells(plate *Plate)

func InsType

func InsType(i int) string

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns true if the underlying error is NotFoundError

func LHError

func LHError(code int, detail string) error

func LHErrorCodeFromErr

func LHErrorCodeFromErr(err error) int

func LHErrorIsInternal

func LHErrorIsInternal(err error) bool

func LHErrorf

func LHErrorf(code int, format string, values ...interface{}) error

LHErrorf convenience method for formatting error messages

func MakePolicies

func MakePolicies() map[string]LHPolicy

func MakeTGraph

func MakeTGraph(inss []*LHInstruction) (tGraph, error)

func Makeseq

func Makeseq(dir string, seq BioSequence) string

creates a fasta file containing the sequence

func MarshalDeckObject

func MarshalDeckObject(object LHObject) ([]byte, error)

MarshalDeckObject marshals any object which can be placed on a deck into valid JSON in a way such that it can be unmarshalled by UnMarshalDeckObject

func MatchString

func MatchString(s1, s2 string) bool

func NameOf

func NameOf(o interface{}) string

NameOf

func NewSTip

func NewSTip(tip *LHTip) *sTip

func NewUUID

func NewUUID() string

func NormaliseComponentName

func NormaliseComponentName(component *Liquid) error

NormaliseComponentName will change the name of the component to the normalised form returned by ReturnNormalisedComponentName. If sub components exist the name will be changed to the list of sub components with concentrations. e.g. a solution called LB with a concentration of 10X and components 10g/L Yeast Extract and 5g/L Tryptone will be normalised to 10g/L Yeast Extract + 5g/L Tryptone. An LB solution with concentration 1 X and no components is returned as 1X LB. An LB solution with no concentration and no components is returned as LB.

func NormaliseName

func NormaliseName(name string) (normalised string)

NormaliseName evaluates whether a string contains a concentration and attempts to normalise the name in a standardised format. e.g. 10ng/ul glucose will be normalised to 10 mg/l glucose or 10mM glucose to 10 mM/l glucose or 10mM/l glucose to 10 mM/l glucose or glucose 10mM/l to 10 mM/l glucose A concatanenated name such as 10g/L glucose + 10g/L yeast extract will be returned with no modifications

func Normalize

func Normalize(tx []string) []string

TODO -- fill in some normalizations - water + salt = saline might be an eg but unlikely to be useful

func Prefix

func Prefix(seq string, lengthofprefix int) (prefix string)

func ReturnNormalisedComponentName

func ReturnNormalisedComponentName(component *Liquid) string

ReturnNormalisedComponentName will return the component name in a normalised form. If sub components exist the name will be changed to the list of sub components with concentrations. e.g. a solution called LB with a concentration of 10X and components 10g/L Yeast Extract and 5g/L Tryptone will be normalised to 10g/L Yeast Extract + 5g/L Tryptone. An LB solution with concentration 1 X and no components is returned as 1X LB. An LB solution with no concentration and no components is returned as LB.

func Rev

func Rev(s string) string

func RevComp

func RevComp(s string) string

Reverse Complement

func ShapeTypeFromName

func ShapeTypeFromName(name string) *shapeType

shapeTypeFromName get a shape type by string name, required for deserialisation returns nil if the name is unknown

func SimulateMix

func SimulateMix(samples ...*Liquid) (newComponentList ComponentList, mixSteps []ComponentListSample, warning error)

SimulateMix simulates the resulting list of components and concentrations which would be generated by mixing the samples together. This will only add the component name itself to the new component list if the sample has no components this is to prevent potential duplication since if a component has a list of sub components the name is considered to be an alias and the component list the true meaning of what the component is. If any sample concentration of zero is found the component list will be made but an error returned.

func Suffix

func Suffix(seq string, lengthofsuffix int) (suffix string)

func TipsPerWell

func TipsPerWell(prm LHChannelParameter, p Plate) (int, int)

func TypeOf

func TypeOf(o interface{}) string

TypeOf

func UpdateComponentDetails

func UpdateComponentDetails(productOfMixes *Liquid, mixes ...*Liquid) error

UpdateComponentDetails corrects the sub component list and normalises the name of a component with the details of all sample mixes which are specified to be the source of that component. This must currently be updated manually using this function.

func ValidAA

func ValidAA(seq string) error

ValidAA checks a sequence given as a string for validity as a ProteinSequence. All standard single letter AminoAcids are valid as well as * indicating stop.

func ValidDNA

func ValidDNA(seq string) error

ValidDNA checks a sequence given as a string for validity as a DNASequence. Any IUPAC nucleotide is considered valid, not just ACTG.

func ValidRNA

func ValidRNA(seq string) error

ValidRNA checks a sequence given as a string for validity as an RNASequence. ACGU are valid entries.

func WCArrayCols

func WCArrayCols(wcA []WellCoords) []int

func WCArrayRows

func WCArrayRows(wcA []WellCoords) []int

Types

type AParam

type AParam struct {
	Name string
	Type reflect.Type
	Desc string
}

a typed parameter, with description

func (AParam) TypeName

func (alhpi AParam) TypeName() string

type AParamSet

type AParamSet map[string]AParam

func GetLHPolicyOptions

func GetLHPolicyOptions() AParamSet

func GetPolicyConsequents

func GetPolicyConsequents() AParamSet

func MakeInstructionParameters

func MakeInstructionParameters() AParamSet

func MakePolicyItems

func MakePolicyItems() AParamSet

func (AParamSet) CodeForIt

func (alhpis AParamSet) CodeForIt() string

func (AParamSet) OrderedList

func (alhpis AParamSet) OrderedList() []string

func (AParamSet) TypeList

func (alhpis AParamSet) TypeList() string

type Absorbance

type Absorbance struct {
	WellLocation WellCoords
	Reading      float64
	Wavelength   float64
	Pathlength   wunit.Length
	Reader       string
	// Annotations is a field to add custom user labels
	Annotations []string
}

func (*Absorbance) BlankCorrect

func (sample *Absorbance) BlankCorrect(blank Absorbance)

func (*Absorbance) PathlengthCorrect

func (sample *Absorbance) PathlengthCorrect(pathlength wunit.Length)

func (Absorbance) WavelengthAsInt

func (a Absorbance) WavelengthAsInt() int

WavelengthAsInt will return the Wavelength field as an int. Whilst it is possible that the wavelength used may be a decimal, Wavelength would typically be expected to be in the form of an integer of the wavelength in nm. In some platereader data sets this is stored as a float so this method is intended to take the safest representation, as a float, and return the more common representation, as an int, for parsers where it is known that the wavelength is stored as an int. This method would therefore not be safe to use for situations where the wavelength may in fact be represented by a decimal.

type AddressIterator

type AddressIterator interface {
	Next() WellCoords
	Curr() WellCoords
	MoveTo(WellCoords)
	Reset()
	GetAddressable() Addressable
	Valid() bool
}

AddressIterator iterates through the addresses in an Addressable

func NewAddressIterator

func NewAddressIterator(addr Addressable, order MajorOrder, ver VerticalDirection, hor HorizontalDirection, repeat bool) AddressIterator

NewAddressIterator iterates through the addresses in addr in order order, moving in directions ver and hor when all addresses are returned, resets to the first address if repeat is true, otherwise Valid() returns false

type AddressSliceIterator

type AddressSliceIterator interface {
	Next() []WellCoords
	Curr() []WellCoords
	MoveTo(WellCoords)
	Reset()
	GetAddressable() Addressable
	Valid() bool
}

AddressSliceIterator iterates through slices of addresses

func NewColumnIterator

func NewColumnIterator(addr Addressable, ver VerticalDirection, hor HorizontalDirection, repeat bool) AddressSliceIterator

NewColumnIterator get an iterator which iterates through the columns of the addressible, optionally repeating

func NewRowIterator

func NewRowIterator(addr Addressable, ver VerticalDirection, hor HorizontalDirection, repeat bool) AddressSliceIterator

NewRowIterator get an iterator which iterates through the columns of the addressible, optionally repeating

func NewTickingIterator

func NewTickingIterator(addr Addressable, order MajorOrder, ver VerticalDirection, hor HorizontalDirection, repeat bool, chunkSize, stepSize, repeatAddresses int) AddressSliceIterator

GetTickingIterator iterates through the addresses in addr in order order, moving in directions ver and hor, returning the output in slices of length chunkSize. In the direction specified by order, steps are of size stepSize (which is assumed to a factor of the number of adresses in that direction), and repeat such that every address is returned. Each address is repeated repeatAddresses times. For example, if addr is of size 4x4, then the iterator returned by

NewTickingIterator(addr, RowOrder, TopToBottom, LeftToRight, false, 4, 2, 2)

returns

[[A1,A1,C1,C2],[B1,B1,D1,D1],[A2,A2, ...

type Addressable

type Addressable interface {
	//AddressExists Do the given coordinates exist in the object?
	AddressExists(WellCoords) bool
	NRows() int
	NCols() int
	//GetChildByAddress Returns the object at the given well coords
	//nil if empty or position doesn't exist
	GetChildByAddress(WellCoords) LHObject
	//CoordsToWellCoords Convert Real world coordinates
	//(relative to the object origin) to WellCoords.
	//The returned WellCoords should be the closest
	//addressable location to the coorinates, and shold only be
	//invalid if the object has no adressable locations (e.g. wells
	//or tips). The second return value gives the offset from the top
	//of the center of the well/tip to the given coordinate
	//(this leaves the caller to ascertain whether any mis-alignment
	//is acceptable)
	CoordsToWellCoords(Coordinates3D) (WellCoords, Coordinates3D)
	//WellCoordsToCoords Get the physical location of an addressable
	//position relative to the object origin.
	//WellCoords should be valid in the object, or the bool will
	//return false and Coordinates are undefined.
	//WellReference is the position within a well.
	//Requesting LiquidReference on a LHTipbox will return false
	WellCoordsToCoords(WellCoords, WellReference) (Coordinates3D, bool)
}

Addressable unifies the interface to objects which have sub-components that can be addressed by WellCoords (e.g. "A1") for example tip-boxes, plates, etc

type AlignedBioSequence

type AlignedBioSequence struct {
	Query   string
	Subject string
	Score   float64
}

type AlignedSequence

type AlignedSequence struct {
	Qstrand string
	Sstrand string
	Qstart  int
	Qend    int
	Sstart  int
	Send    int
	Qseq    string
	Sseq    string
	ID      float64
}

struct for holding an aligned sequence

func NewAlignedSequence

func NewAlignedSequence() AlignedSequence

constructor for an AlignedSequence object, makes an empty structure

func (AlignedSequence) CentreToQuery

func (aln AlignedSequence) CentreToQuery(q string) (string, string)

CentreToQuery trims aligned (subject) sequences to only those residues/nucleotides aligned to those in the query. This removes inserts (with respect to the query) from aligned sequences. Gaps within the interior of the aligned sequence are already represented by '-' characters, however gaps at the ends of the aligned sequence must be added here as well. The resulting aligned sequences will have the same length as the query.

type AminoAcid

type AminoAcid string

AminoAcid is a single letter format amino acid in string form. It can be validated as a valid AminoAcid using the SetAminoAcid function.

func SetAminoAcid

func SetAminoAcid(aa string) (AminoAcid, error)

SetAminoAcid creates an AminoAcid from a string input and returns an error if the string is not a valid amino acid.

type Annotatable

type Annotatable interface {
	GetData(k string) (AnthaData, error)
	AddData(k string, d AnthaData) error
	ClearData(k string) error
}

type AnthaData

type AnthaData struct {
	Name string
	Data string
}

type BBox

type BBox struct {
	Position Coordinates3D
	Size     Coordinates3D
}

BBox is a simple LHObject representing a bounding box, useful for checking if there's stuff in the way

func NewBBox

func NewBBox(pos, Size Coordinates3D) *BBox

func NewBBox6f

func NewBBox6f(pos_x, pos_y, pos_z, Size_x, Size_y, Size_z float64) *BBox

func NewXBox4f

func NewXBox4f(pos_y, pos_z, Size_y, Size_z float64) *BBox

func NewYBox4f

func NewYBox4f(pos_x, pos_z, Size_x, Size_z float64) *BBox

func NewZBox4f

func NewZBox4f(pos_x, pos_y, Size_x, Size_y float64) *BBox

func (BBox) Contains

func (self BBox) Contains(rhs Coordinates3D) bool

func (BBox) ContainsBox

func (self BBox) ContainsBox(rhs BBox) bool

func (*BBox) Dup

func (self *BBox) Dup() *BBox

Dup duplicate the bounding box

func (BBox) Equals

func (bb BBox) Equals(bb2 BBox) bool

Equals defines an equivalence relation over bounding boxes returns true iff position and size are both equal

func (BBox) GetPosition

func (self BBox) GetPosition() Coordinates3D

func (BBox) GetSize

func (self BBox) GetSize() Coordinates3D

func (BBox) IntersectsBox

func (self BBox) IntersectsBox(rhs BBox) bool

IntersectsBox checks for bounding box intersection

func (BBox) IntersectsPoint

func (self BBox) IntersectsPoint(rhs Coordinates3D) bool

IntersectsPoint

func (*BBox) SetPosition

func (self *BBox) SetPosition(c Coordinates3D)

func (*BBox) SetSize

func (self *BBox) SetSize(c Coordinates3D)

func (BBox) String

func (self BBox) String() string

String gets a string representation of the box

func (BBox) ZMax

func (self BBox) ZMax() float64

type BLASTSearchParameters

type BLASTSearchParameters struct {
	Evalthreshold float64
	Matrix        string
	Filter        bool
	Open          int
	Extend        int
	DBSeqs        int
	DBAlns        int
	GCode         int
}

func DefaultBLASTSearchParameters

func DefaultBLASTSearchParameters() BLASTSearchParameters

type BioSequence

type BioSequence interface {
	Name() string
	Sequence() string
	Append(string) error
	Prepend(string) error
	Blast() ([]Hit, error)
	MolecularWeight() float64
}

defines things which have biosequences... useful for operations valid on biosequences such as BLASTing / other alignment methods

type BlastHit

type BlastHit struct {
	Name       string
	Score      float64
	Eval       float64
	Alignments []AlignedSequence
}

struct for holding a particular hit

func NewBlastHit

func NewBlastHit() BlastHit

constructor, makes an empty BlastHit structure

type BlastResults

type BlastResults struct {
	Program       string
	DBname        string
	DBSizeSeqs    int
	DBSizeLetters int
	Query         string
	Hits          []BlastHit
}

struct for holding results of a blast search

func NewBlastResults

func NewBlastResults() BlastResults

constructor, makes an empty BlastResults structure

func (BlastResults) QueryCentredAlignment

func (res BlastResults) QueryCentredAlignment() []AlignedBioSequence

type BlockID

type BlockID struct {
	Value string
}

A block of instructions associated with a particular job, etc.

func NewBlockID

func NewBlockID(id string) BlockID

func (BlockID) String

func (a BlockID) String() string

type ByColumn

type ByColumn []*LHInstruction

func (ByColumn) Len

func (bg ByColumn) Len() int

func (ByColumn) Less

func (bg ByColumn) Less(i, j int) bool

func (ByColumn) Swap

func (bg ByColumn) Swap(i, j int)

type ByResultComponent

type ByResultComponent []*LHInstruction

Optimally - order by component.

func (ByResultComponent) Len

func (bg ByResultComponent) Len() int

func (ByResultComponent) Less

func (bg ByResultComponent) Less(i, j int) bool

func (ByResultComponent) Swap

func (bg ByResultComponent) Swap(i, j int)

type CentrifugeParameters

type CentrifugeParameters map[string]interface{}

type ChannelOrientation

type ChannelOrientation bool
const (
	LHVChannel ChannelOrientation = iota%2 == 1 // vertical orientation
	LHHChannel                                  // horizontal orientation
)

func (ChannelOrientation) String

func (o ChannelOrientation) String() string

type ChannelPositions

type ChannelPositions []Coordinates2D

A list of 2d coordinates of the channels of an adaptor in channel order

func (ChannelPositions) Add

Add return a new set of channel positions with the offset added

func (ChannelPositions) GetCenter

func (self ChannelPositions) GetCenter() Coordinates2D

GetCenter return the center of the channel coordinates

func (ChannelPositions) Size

func (self ChannelPositions) Size(channelRadius float64) Coordinates2D

Size get the total footprint size of the channel positions including the radius

func (ChannelPositions) Subtract

func (self ChannelPositions) Subtract(rhs Coordinates2D) ChannelPositions

Subtract return a new set of channel positions with the offset subtracted

type Classy

type Classy interface {
	GetClass() string
}

the class of thing it is, mainly for more helpful errors

type Codon

type Codon string

Codon is a triplet of valid nucleotides which encodes an amino acid or stop codon. It can be validated using the SetCodon function.

func SetCodon

func SetCodon(dna string) (Codon, error)

SetCodon creates a Codon from a string input and returns an error if the string is not a valid codon.

type CodonSet

type CodonSet map[string]float64

func (CodonSet) ChooseWeighted

func (cs CodonSet) ChooseWeighted() string

func (CodonSet) Codons

func (cs CodonSet) Codons() []string

type CodonTable

type CodonTable struct {
	TaxID     string
	CodonByAA map[string]CodonSet // maps amino acid to set of codons
	AAByCodon map[string]string   // maps codon to amino acid
}

func NewCodonTable

func NewCodonTable() CodonTable

func ParseCodonTableSimpleFormat

func ParseCodonTableSimpleFormat(sa []string) CodonTable

these are tables devised by wholesale analysis of CDS sets

func (CodonTable) ChooseWeighted

func (ct CodonTable) ChooseWeighted(aa string) string

type ComponentList

type ComponentList struct {
	Components map[string]wunit.Concentration `json:"Components"`
}

List of the components and corresponding concentrations contained within an LHComponent

func GetSubComponents

func GetSubComponents(component *Liquid) (componentMap ComponentList, err error)

GetSubComponents returns a component list from a component

func MixComponentLists

func MixComponentLists(sample1, sample2 ComponentListSample) (newList ComponentList, err error)

MixComponentLists merges two componentListSamples. When two ComponentListSamples are mixed a new diluted ComponentList is generated. An error may be generated if two components with the same name exist within the two lists with incompatible concentration units. In this instance, the molecular weight for that component will be looked up in pubchem in order to change the units in both lists to g/l, which will be able to be added.

func (ComponentList) Add

func (c ComponentList) Add(component *Liquid, conc wunit.Concentration) (newlist ComponentList)

add a single entry to a component list

func (ComponentList) AllComponents

func (c ComponentList) AllComponents() []string

Returns all component names present in component list, sorted in alphabetical order.

func (ComponentList) Dup

func (c ComponentList) Dup() ComponentList

func (ComponentList) Get

func (c ComponentList) Get(component *Liquid) (conc wunit.Concentration, err error)

Get a single concentration set point for a named component present in a component list. An error will be returned if the component is not present.

func (ComponentList) GetByName

func (c ComponentList) GetByName(component string) (conc wunit.Concentration, err error)

Get a single concentration set point using just the name of a component present in a component list. An error will be returned if the component is not present.

func (ComponentList) List

func (c ComponentList) List(options ...bool) string

List all Components and concentration set points present in a component list. if verbose is set to true the field annotations for each component and concentration will be included for each component. option1 is verbose, option2 is use mixdelimiter

func (ComponentList) RemoveConcsFromSubComponentNames

func (c ComponentList) RemoveConcsFromSubComponentNames() (nc ComponentList)

type ComponentListSample

type ComponentListSample struct {
	ComponentList
	Volume wunit.Volume
}

ComponentListSample is a sample of a Component list at a specified volume when two ComponentListSamples are mixed a new diluted ComponentList is generated

type ComponentMatch

type ComponentMatch struct {
	Matches []Match
}

type ComponentVector

type ComponentVector []*Liquid

func (ComponentVector) Dup

func (ComponentVector) Equal

func (cv1 ComponentVector) Equal(cv2 ComponentVector) bool

func (ComponentVector) Filter

func (cv ComponentVector) Filter(filters ...func(*Liquid) bool) ComponentVector

Filter returns the subset of the liquids in cv for which every filter returns true does not guarantee to call every filter on every liquid

func (ComponentVector) GetNames

func (cv ComponentVector) GetNames() []string

func (ComponentVector) GetPlateIds

func (cv ComponentVector) GetPlateIds() []string

func (ComponentVector) GetVols

func (cv ComponentVector) GetVols() []wunit.Volume

func (ComponentVector) GetWellCoords

func (cv ComponentVector) GetWellCoords() []string

func (ComponentVector) IsEmpty

func (cv ComponentVector) IsEmpty() bool

IsEmpty returns true if there is no volume in the component vector

func (ComponentVector) Map

func (cv ComponentVector) Map(maps ...func(*Liquid) *Liquid) ComponentVector

Map return a new componentvector which is the result calling each function in maps sequentially on each element

func (ComponentVector) String

func (cv ComponentVector) String() string

func (ComponentVector) SubtractVolume

func (cv ComponentVector) SubtractVolume(vol wunit.Volume)

func (ComponentVector) Volume

func (cv ComponentVector) Volume() wunit.Volume

Volume get the total volume of liquid in the component vector

type ConfigItem

type ConfigItem map[string]interface{}

type Coordinates2D

type Coordinates2D struct {
	X float64
	Y float64
}

func (Coordinates2D) Abs

func (self Coordinates2D) Abs() float64

Abs return the L2 norm of the coordinate

func (Coordinates2D) Add

Add return a new coordinate which is the sum of the two

func (Coordinates2D) Divide

func (self Coordinates2D) Divide(factor float64) Coordinates2D

Divide return a new coordinate scaled by the reciprocal of factor if factor is zero, inf will be returned

func (Coordinates2D) Equals

func (self Coordinates2D) Equals(rhs Coordinates2D) bool

Equals return true if the two coordinates are equal

func (Coordinates2D) Multiply

func (self Coordinates2D) Multiply(factor float64) Coordinates2D

Multiply return a new coordinate scaled by factor

func (Coordinates2D) String

func (self Coordinates2D) String() string

String string representation of the coordinate

func (Coordinates2D) Subtract

func (self Coordinates2D) Subtract(rhs Coordinates2D) Coordinates2D

Subtract return a new coordinate which is self minus rhs

type Coordinates3D

type Coordinates3D struct {
	X float64
	Y float64
	Z float64
}

func OriginOf

func OriginOf(o LHObject) Coordinates3D

get the origin for the objects coordinate system

func (Coordinates3D) Abs

func (self Coordinates3D) Abs() float64

Abs L2-Norm

func (Coordinates3D) AbsXY

func (self Coordinates3D) AbsXY() float64

AbsXY L2-Norm in XY only

func (Coordinates3D) Add

Add Addition returns a new wtype.Coordinates

func (Coordinates3D) Dim

func (a Coordinates3D) Dim(x int) float64

Dim Value for dimension

func (Coordinates3D) Divide

func (self Coordinates3D) Divide(v float64) Coordinates3D

Divide returns a new wtype.Coordinates divided by v. If v is zero, inf will be returned

func (Coordinates3D) Dot

func (self Coordinates3D) Dot(rhs Coordinates3D) float64

Dot product

func (Coordinates3D) Equals

func (c Coordinates3D) Equals(c2 Coordinates3D) bool

func (Coordinates3D) Multiply

func (self Coordinates3D) Multiply(v float64) Coordinates3D

Multiply returns a new wtype.Coordinates

func (Coordinates3D) String

func (self Coordinates3D) String() string

String implements Stringer

func (Coordinates3D) StringXY

func (self Coordinates3D) StringXY() string

func (Coordinates3D) Subtract

func (self Coordinates3D) Subtract(rhs Coordinates3D) Coordinates3D

Subtract returns a new wtype.Coordinates

func (Coordinates3D) To2D

func (self Coordinates3D) To2D() Coordinates2D

To2D return a two dimensional coordinate by dropping z dimension

func (Coordinates3D) Unit

func (self Coordinates3D) Unit() Coordinates3D

Unit return a Unit vector in the same direction as the coordinates

type DNA

type DNA struct {
	Seq DNASequence
}

defines something as physical DNA hence it is physical and has a DNASequence

type DNASeqSet

type DNASeqSet []*DNASequence

func (DNASeqSet) AsBioSequences

func (dss DNASeqSet) AsBioSequences() []BioSequence

type DNASequence

type DNASequence struct {
	Nm             string    `json:"nm"`
	Seq            string    `json:"seq"`
	Plasmid        bool      `json:"plasmid"`
	Singlestranded bool      `json:"single_stranded"`
	Overhang5prime Overhang  `json:"overhang_5_prime"`
	Overhang3prime Overhang  `json:"overhang_3_prime"`
	Methylation    string    `json:"methylation"` // add histones etc?
	Features       []Feature `json:"features"`
}

DNAsequence is a type of Biosequence

func Annotate

func Annotate(dnaseq DNASequence, features []Feature) (annotated DNASequence)

func MakeDNASequence

func MakeDNASequence(name string, seqstring string, properties []string) (seq DNASequence, err error)

func MakeLinearDNASequence

func MakeLinearDNASequence(name string, seqstring string) (seq DNASequence)

func MakePlasmidDNASequence

func MakePlasmidDNASequence(name string, seqstring string) (seq DNASequence)

func MakeSingleStrandedDNASequence

func MakeSingleStrandedDNASequence(name string, seqstring string) (seq DNASequence)

func Phosphorylate

func Phosphorylate(dnaseq DNASequence) (phosphorylateddna DNASequence, err error)

func (*DNASequence) AddBluntEnd

func (seq *DNASequence) AddBluntEnd(end int) (err error)

AddBluntOverhang adds a blunt overhang to a specified end. Valid options are either 5 (for 5 prime/upstream end) or 3 (for 3 prime/upstream end).

func (*DNASequence) AddOverhang

func (seq *DNASequence) AddOverhang(end int, sequence string) (err error)

AddOverhang adds an overhang to a specified end. Valid options are either 5 (for 5 prime/upstream end) or 3 (for 3 prime/upstream end).

func (*DNASequence) AddUnderhang

func (seq *DNASequence) AddUnderhang(end int, sequence string) (err error)

AddUnderhang adds an underhang to a specified end. Valid options are either 5 (for 5 prime/upstream end) or 3 (for 3 prime/upstream end).

func (*DNASequence) Append

func (dna *DNASequence) Append(s string) error

Append appends the existing dna sequence with the upper case of the string added

func (*DNASequence) Blast

func (seq *DNASequence) Blast() (hits []Hit, err error)

Blast performs a blast search on the sequence and returns any hits found. An error is returned if a problem interacting with the blast server occurs.

func (DNASequence) Dup

func (seq DNASequence) Dup() DNASequence

func (DNASequence) FeatureNames

func (annotated DNASequence) FeatureNames() (featurenames []string)

FeatureNames returns a list of all feature names in the sequence

func (DNASequence) GetFeatureByName

func (annotated DNASequence) GetFeatureByName(featureName string) (returnedFeatures []Feature)

GetFeatureByName returns all features found which match the specified feature name. Searches are not case sensitive.

func (*DNASequence) MolecularWeight

func (seq *DNASequence) MolecularWeight() float64

MolecularWeight calculates the molecular weight of the specified DNA sequence. For accuracy it is important to specify if the DNA is single stranded or doublestranded along with phosphorylation.

func (*DNASequence) Name

func (dna *DNASequence) Name() string

Name returns the name of the DNASequence

func (*DNASequence) Prepend

func (dna *DNASequence) Prepend(s string) error

Preprend adds the requested sequence to the beginning of the existing sequence.

func (*DNASequence) RevComp

func (dna *DNASequence) RevComp() string

RevComp returns the reverse complement of the DNASequence.

func (*DNASequence) Sequence

func (dna *DNASequence) Sequence() string

Sequence returns the sequence of the DNA Sequence

func (*DNASequence) Set3PrimeEnd

func (seq *DNASequence) Set3PrimeEnd(overhang Overhang) (err error)

Set3PrimeEnd adds a 3 prime overhang to a sequence. Validation is performed on the compatibility of the overhang with the sequence.

func (*DNASequence) Set5PrimeEnd

func (seq *DNASequence) Set5PrimeEnd(overhang Overhang) (err error)

Set5PrimeEnd adds a 5 prime overhang to a sequence. Validation is performed on the compatibility of the overhang with the sequence.

func (*DNASequence) SetName

func (dna *DNASequence) SetName(name string)

SetName sets the names of the dna sequence

func (*DNASequence) SetSequence

func (dna *DNASequence) SetSequence(seq string) error

SetSequence checks the validity of sequence given as an argument and if all characters are present in ValidNucleotides If invalid characters are found an error returned listing all invalid characters and their positions in human friendly form. i.e. the first position is 1 and not 0.

type ElectroshockParameters

type ElectroshockParameters map[string]interface{}

type Entity

type Entity interface {
	IsEntity() bool
}

type Enzyme

type Enzyme struct {
	Properties map[string]wunit.Measurement
	Nm         string
}

structure which defines an enzyme -- solutions containing enzymes need careful handling as they can be quite delicate

func (Enzyme) Name

func (enzyme Enzyme) Name() string

type Feature

type Feature struct {
	Name          string `json:"name"`
	Class         string `json:"class	"` //  defined by constants above
	Reverse       bool   `json:"reverse"`
	StartPosition int    `json:"start_position"` // in human friendly format
	EndPosition   int    `json:"end_position"`   // in human friendly format
	DNASeq        string `json:"dna_seq"`
	Protseq       string `json:"prot_seq"`
}

Feature describes a feature within a sequence, it's position in the sequence, in human friendly format, a protein sequence if applicablae and a class. Use the MakeFeature and AddFeature functions from the sequences packages. valid class fields are:

ORF = "ORF"
CDS = "CDS"
GENE = "gene"
MISC_FEATURE = "misc_feature"
PROMOTER = "promoter"
TRNA = "tRNA"
RRNA = "rRNA"
NCRNA = "ncRNA"
REGULATORY = "regulatory"
REPEAT_REGION = "repeat_region"

func (*Feature) Coordinates

func (feat *Feature) Coordinates(options ...string) (start, end int)

Coordinates returns the start and end positions of the feature by default this will return the start position followed by the end position in human friendly format Available options are: HUMANFRIENDLY returns a sequence PositionPair's start and end positions in a human friendly format i.e. in a Sequence "ATGTGTTG" position 1 is A, 2 is T. CODEFRIENDLY returns a sequence PositionPair's start and end positions in a code friendly format i.e. in a Sequence "ATGTGTTG" position 0 is A, 1 is T. IGNOREDIRECTION is a constant to specify that direction of a feature position should be ignored when returning start and end positions of a feature. If selected, the start position will be the first position at which the feature is encountered regardless of orientation.

func (Feature) DNASequence

func (f Feature) DNASequence() DNASequence

DNASequence returns the linear DNA sequence of the feature.

func (*Feature) End

func (f *Feature) End(options ...string) int

End returns the end position of the Feature by default this will return a directional human friendly position

func (*Feature) Start

func (f *Feature) Start(options ...string) int

Start returns the start position of the Feature by default this will return a directional human friendly position

type File

type File struct {
	Name string
	// contains filtered or unexported fields
}

Representation of a file.

func AutoExportPlateCSV

func AutoExportPlateCSV(outputFileName string, plate *Plate) (file File, err error)

AutoExportPlateCSV exports an LHPlate and its contents as a csv file. This is not 100% safe to use in elements since, currently, at the time of running an element, the scheduler will not have allocated positions for the components so, for example, accurate well information cannot currently be obtained with this function. If allocating wells manually use the ExportPlateCSV function and explicitely set the sample locations and volumes.

func ExportPlateCSV

func ExportPlateCSV(outputFileName string, plate *Plate, plateName string, wells []string, liquids []*Liquid, volumes []wunit.Volume) (file File, err error)

ExportPlateCSV a exports an LHPlate and its contents as a csv file. The caller is required to set the well locations and volumes explicitely with this function.

func (File) MarshalJSON

func (a File) MarshalJSON() ([]byte, error)

func (*File) ReadAll

func (a *File) ReadAll() ([]byte, error)

ReadAll returns contents of file.

func (*File) UnmarshalBlob

func (a *File) UnmarshalBlob(blob *api.Blob) error

func (*File) UnmarshalJSON

func (a *File) UnmarshalJSON(data []byte) error

func (*File) WriteAll

func (a *File) WriteAll(data []byte) error

WriteAll replaces contents of file with data.

type FileSeries

type FileSeries struct {
	Files []File
}

FileSeries is a datatype representing a set of files for data processing usecases: - the files are related to the same entity (likely to the same device); - the files implicitly form a single dataset - i.e. they likely have the same data schema; A parameter of type FileSeries signals to the UI that it should be set using a special query dialog (rather than manually filling the list of files).

type FromFactory

type FromFactory struct {
	String string
}

func (*FromFactory) MarshalJSON

func (f *FromFactory) MarshalJSON() ([]byte, error)

func (*FromFactory) UnmarshalJSON

func (f *FromFactory) UnmarshalJSON(b []byte) error

type Haswelladdress

type Haswelladdress interface {
	PlateID() string
	WellCoords() WellCoords
}

type HorizontalDirection

type HorizontalDirection int
const (
	LeftToRight HorizontalDirection = 1
	RightToLeft HorizontalDirection = -1
)

func (HorizontalDirection) String

func (s HorizontalDirection) String() string

type IChain

type IChain struct {
	Parent *IChain
	Child  *IChain
	Values []*LHInstruction
	Depth  int
}

func MakeNewIChain

func MakeNewIChain(vals ...[]*LHInstruction) *IChain

MakeNewIChain return a chain containing one node for each argument, linked in sequence skip any empty sets

func NewIChain

func NewIChain(parent *IChain) *IChain

func (*IChain) AsList

func (it *IChain) AsList(ica []*IChain) []*IChain

func (*IChain) AssertInstructionsSeparate

func (self *IChain) AssertInstructionsSeparate() error

AssertInstructionsSeparate check that there's only one type of instruction in each link of the chain

func (*IChain) FindEnd

func (it *IChain) FindEnd() *IChain

func (*IChain) FlattenInstructionIDs

func (it *IChain) FlattenInstructionIDs() []string

FlattenInstructionIDs returns a slice containing the IDs of each instruction in the chain in order

func (*IChain) GetOrderedLHInstructions

func (it *IChain) GetOrderedLHInstructions() []*LHInstruction

GetOrderedLHInstructions get the instructions in order

func (*IChain) Height

func (it *IChain) Height() int

depth from here

func (*IChain) Print

func (it *IChain) Print()

func (*IChain) PruneOut

func (it *IChain) PruneOut(Remove map[string]bool) *IChain

func (*IChain) Reverse

func (it *IChain) Reverse()

func (*IChain) SortInstructions

func (ic *IChain) SortInstructions(byComponent bool)

SortInstructions sort the instructions within each link of the chain

func (*IChain) SplitMixedNodes

func (it *IChain) SplitMixedNodes() *IChain

func (*IChain) SwapForChain

func (ch *IChain) SwapForChain(newch *IChain) *IChain

SwapForChain replace node ch with the node chain starting with newch

if ch is the head of the chain, return newch as the new head
otherwise return nil

func (*IChain) ValueIDs

func (it *IChain) ValueIDs() []string

type Identifiable

type Identifiable interface {
	GetID() string
}

type Kind

type Kind uint8
const (
	Float64 Kind = iota
	Int
	String
	Volume
	Bool
)

type LHAdaptor

type LHAdaptor struct {
	Name         string
	ID           string
	Manufacturer string
	Params       *LHChannelParameter
	Tips         []*LHTip
}

adaptor

func NewLHAdaptor

func NewLHAdaptor(name, mf string, params *LHChannelParameter) *LHAdaptor

NewLHAdaptor make a new adaptor

func (*LHAdaptor) AdaptorType

func (lha *LHAdaptor) AdaptorType() string

AdaptorType the manufacturer and name of the adaptor

func (*LHAdaptor) AddTip

func (lha *LHAdaptor) AddTip(channelNumber int, tip *LHTip)

AddTip Load a tip to the specified channel, overwriting any tip already present

func (*LHAdaptor) Dup

func (lha *LHAdaptor) Dup() *LHAdaptor

Dup duplicate the adaptor and any loaded tips with new IDs

func (*LHAdaptor) DupKeepIDs

func (lha *LHAdaptor) DupKeepIDs() *LHAdaptor

DupKeepIDs duplicate the adaptor and any loaded tips keeping the same IDs

func (*LHAdaptor) GetLargestChannelSpacing

func (self *LHAdaptor) GetLargestChannelSpacing() Coordinates2D

GetLargestChannelSpacing get the largest possible distance between successive channels

func (*LHAdaptor) GetMostCompactChannelPositions

func (self *LHAdaptor) GetMostCompactChannelPositions() ChannelPositions

GetMostCompactChannelPositions get the relative channel positions for the adaptor in the most tightly bunched layout supported

func (*LHAdaptor) GetParams

func (lha *LHAdaptor) GetParams() *LHChannelParameter

GetParams get the channel parameters for the adaptor, combined with any loaded tips

func (*LHAdaptor) GetSmallestChannelSpacing

func (self *LHAdaptor) GetSmallestChannelSpacing() Coordinates2D

GetSmallestChannelSpacing get the smallest possible distance between successive channels

func (*LHAdaptor) GetTip

func (lha *LHAdaptor) GetTip(channelNumber int) *LHTip

GetTip Return the tip at channelNumber, nil otherwise

func (*LHAdaptor) GetWellTargets

func (self *LHAdaptor) GetWellTargets(well *LHWell) []Coordinates2D

GetWellTargets get the offset from the center of the well for each channel that can access the well simultaneously returns nil if the well cannot fit multiple channels

func (*LHAdaptor) IsTipLoaded

func (lha *LHAdaptor) IsTipLoaded(channelNumber int) bool

IsTipLoaded Is there a tip loaded on channelNumber

func (*LHAdaptor) NumTipsLoaded

func (lha *LHAdaptor) NumTipsLoaded() int

NumTipsLoaded the number of tips currently loaded

func (*LHAdaptor) RemoveTip

func (lha *LHAdaptor) RemoveTip(channelNumber int) *LHTip

RemoveTip Remove a tip from the specified channel and return it

func (*LHAdaptor) RemoveTips

func (lha *LHAdaptor) RemoveTips() []*LHTip

RemoveTips Return all previously loaded tips, with nils removed

type LHCategoryCondition

type LHCategoryCondition struct {
	Category string
}

func (LHCategoryCondition) IsEqualTo

func (lhcc LHCategoryCondition) IsEqualTo(other LHCondition) bool

func (LHCategoryCondition) Match

func (lhcc LHCategoryCondition) Match(v interface{}) bool

func (LHCategoryCondition) Type

func (lhcc LHCategoryCondition) Type() string

type LHChannelParameter

type LHChannelParameter struct {
	ID          string
	Platform    string
	Name        string
	Minvol      wunit.Volume
	Maxvol      wunit.Volume
	Minspd      wunit.FlowRate
	Maxspd      wunit.FlowRate
	Multi       int
	Independent bool
	Orientation ChannelOrientation
	Head        int
}

describes sets of parameters which can be used to create a configuration

func NewLHChannelParameter

func NewLHChannelParameter(name, platform string, minvol, maxvol wunit.Volume, minspd, maxspd wunit.FlowRate, multi int, independent bool, orientation ChannelOrientation, head int) *LHChannelParameter

func (LHChannelParameter) CanMove

func (lhcp LHChannelParameter) CanMove(v wunit.Volume, oneshot bool) bool

can you move this much? If oneshot is true it's strictly Minvol <= v <= Maxvol otherwise it's just Minvol <= v

func (*LHChannelParameter) Dup

func (*LHChannelParameter) DupKeepIDs

func (lhcp *LHChannelParameter) DupKeepIDs() *LHChannelParameter

func (*LHChannelParameter) Equals

func (lhcprm *LHChannelParameter) Equals(prm2 *LHChannelParameter) bool

func (LHChannelParameter) GetConstraint

func (lhcp LHChannelParameter) GetConstraint(n int) LHMultiChannelConstraint

given the dimension of the plate, what is the constraint on multichannel access?

func (*LHChannelParameter) MergeWithTip

func (lhcp *LHChannelParameter) MergeWithTip(tip *LHTip) *LHChannelParameter

func (LHChannelParameter) String

func (lhcp LHChannelParameter) String() string

func (LHChannelParameter) VolumeLimitString

func (lhcp LHChannelParameter) VolumeLimitString() string

type LHComponent

type LHComponent = Liquid

LHComponent is an alias for Liquid to preserve backwards compatibility Liquid describes a liquid component and its desired properties

type LHCondition

type LHCondition interface {
	Match(interface{}) bool
	Type() string
	IsEqualTo(LHCondition) bool
}

type LHContainer

type LHContainer interface {
	Contents() *Liquid
	CurrentVolume() wunit.Volume
	ResidualVolume() wunit.Volume
	//WorkingVolume = CurrentVolume - ResidualVolume
	CurrentWorkingVolume() wunit.Volume
	//Add to the container
	AddComponent(*Liquid) error
	//Set the contents of the container
	SetContents(*Liquid) error
	//Remove from the container
	RemoveVolume(wunit.Volume) (*Liquid, error)
}

LHContainer a tip or a well or something that holds liquids

type LHDeck

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

LHDeck Represents a robot deck

func NewLHDeck

func NewLHDeck(name, mfg, decktype string) *LHDeck

NewLHDeck make a new deck

func (*LHDeck) Accepts

func (self *LHDeck) Accepts(name string, child LHObject) bool

func (*LHDeck) AddSlot

func (self *LHDeck) AddSlot(name string, position Coordinates3D, size Coordinates2D)

func (*LHDeck) Clear

func (self *LHDeck) Clear(name string) error

func (*LHDeck) ClearParent

func (self *LHDeck) ClearParent()

@implement LHObject

func (*LHDeck) DimensionsString

func (self *LHDeck) DimensionsString() string

DimensionsString returns a string description of the position and size of the object and its children.

func (*LHDeck) Duplicate

func (self *LHDeck) Duplicate(keepIDs bool) LHObject

Duplicate copy the LHObject, optionally keeping IDs unchanged

func (*LHDeck) GetBoxIntersections

func (self *LHDeck) GetBoxIntersections(box BBox) []LHObject

func (*LHDeck) GetChild

func (self *LHDeck) GetChild(name string) (LHObject, bool)

@implements LHParent

func (*LHDeck) GetChildBelow

func (self *LHDeck) GetChildBelow(point Coordinates3D) LHObject

Return the nearest object below the point, nil if none. The base of the object is used as reference, so e.g. a point within a well will return the plate

func (*LHDeck) GetClass

func (self *LHDeck) GetClass() string

func (*LHDeck) GetID

func (self *LHDeck) GetID() string

func (*LHDeck) GetManufacturer

func (self *LHDeck) GetManufacturer() string

func (*LHDeck) GetName

func (self *LHDeck) GetName() string

func (*LHDeck) GetParent

func (self *LHDeck) GetParent() LHObject

func (*LHDeck) GetPointIntersections

func (self *LHDeck) GetPointIntersections(point Coordinates3D) []LHObject

func (*LHDeck) GetPosition

func (self *LHDeck) GetPosition() Coordinates3D

func (*LHDeck) GetSize

func (self *LHDeck) GetSize() Coordinates3D

zero size

func (*LHDeck) GetSlotContaining

func (self *LHDeck) GetSlotContaining(obj LHObject) string

func (*LHDeck) GetSlotNames

func (self *LHDeck) GetSlotNames() []string

func (*LHDeck) GetSlotNamesBelow

func (self *LHDeck) GetSlotNamesBelow(point Coordinates3D) []string

func (*LHDeck) GetSlotPosition

func (self *LHDeck) GetSlotPosition(name string) Coordinates3D

func (*LHDeck) GetSlotSize

func (self *LHDeck) GetSlotSize(name string) Coordinates2D

func (*LHDeck) GetType

func (self *LHDeck) GetType() string

func (*LHDeck) GetVChildren

func (self *LHDeck) GetVChildren(point Coordinates3D) []LHObject

get all objects above and below the point

func (*LHDeck) SetChild

func (self *LHDeck) SetChild(name string, child LHObject) error

func (*LHDeck) SetOffset

func (self *LHDeck) SetOffset(o Coordinates3D) error

func (*LHDeck) SetParent

func (self *LHDeck) SetParent(o LHObject) error

func (*LHDeck) SetSlotAccepts

func (self *LHDeck) SetSlotAccepts(name string, class string)

type LHDevice

type LHDevice struct {
	ID   string
	Name string
	Mnfr string
}

func NewLHDevice

func NewLHDevice(name, mfr string) *LHDevice

func (*LHDevice) Dup

func (lhd *LHDevice) Dup() *LHDevice

type LHGlobals

type LHGlobals struct {
	MIN_REASONABLE_VOLUME_UL float64
	VOL_RESOLUTION_DIGITS    int
}

type LHHead

type LHHead struct {
	Name         string
	Manufacturer string
	ID           string
	Adaptor      *LHAdaptor
	Params       *LHChannelParameter
	TipLoading   TipLoadingBehaviour // defines the way in which tips are loaded into the head
}

head

func NewLHHead

func NewLHHead(name, mf string, params *LHChannelParameter) *LHHead

NewLHHead constructor for liquid handling heads

func (*LHHead) CanReach

func (head *LHHead) CanReach(plate *LHPlate, addresses WellCoordSlice) bool

CanReach return true if the head can service the given addresses in the given object simultaneously. addresses is a slice of well addresses which should be serviced by successive channels of the head, eg. ["A1", "B1", "", "D1",] means channels 0, 1, and 3 should address wells A1, B1, and D1 respectively and channels 2 and 4-7 should not be used. Repeated addresses (e.g. ["A1", "A1", "A1"]) imply multiple tips per well, with exact positioning for each tip calculated with LHHead.GetWellTargets(). Addresses are not reordered, and so ["A1", "B1"] != ["B1", "A1"].

func (*LHHead) Dup

func (head *LHHead) Dup() *LHHead

Dup duplicate the head and adaptor, changing the IDs

func (*LHHead) DupKeepIDs

func (head *LHHead) DupKeepIDs() *LHHead

DupKeepIDs duplicate the head and adaptor, keeping the IDs the same

func (*LHHead) GetParams

func (lhh *LHHead) GetParams() *LHChannelParameter

GetParams get the channel parameters of the head or the adaptor if one is loaded

type LHHeadAssembly

type LHHeadAssembly struct {
	Positions      []*LHHeadAssemblyPosition
	MotionLimits   *BBox          //the limits on range of motion of the head assembly, nil if unspecified
	VelocityLimits *VelocityRange // the range of valid velocities for the head, nil if unspecified
}

LHHeadAssembly represent a set of LHHeads which are constrained to move together

func NewLHHeadAssembly

func NewLHHeadAssembly(MotionLimits *BBox) *LHHeadAssembly

NewLHHeadAssembly build a new head assembly

func (*LHHeadAssembly) AddPosition

func (self *LHHeadAssembly) AddPosition(Offset Coordinates3D)

AddPosition add a position to the head assembly with the given offset

func (*LHHeadAssembly) CountHeadsLoaded

func (self *LHHeadAssembly) CountHeadsLoaded() int

GetNumHeadsLoaded get the number of heads that are loaded into the assembly

func (*LHHeadAssembly) CountPositions

func (self *LHHeadAssembly) CountPositions() int

GetNumPositions get the number of positions added to the head assembly

func (*LHHeadAssembly) DupWithoutHeads

func (self *LHHeadAssembly) DupWithoutHeads() *LHHeadAssembly

DupWithoutHeads copy the headassembly leaving all positions in the new assembly unloaded

func (*LHHeadAssembly) GetLoadedHeads

func (self *LHHeadAssembly) GetLoadedHeads() []*LHHead

GetLoadedHeads get an ordered slice of all the heads that have been loaded into the assembly

func (*LHHeadAssembly) LoadHead

func (self *LHHeadAssembly) LoadHead(head *LHHead) error

LoadHead load a head into the next available position in the assembly, returns error if no positions are available

func (*LHHeadAssembly) UnloadAllHeads

func (self *LHHeadAssembly) UnloadAllHeads()

UnloadAllHeads unload all heads from the assembly

func (*LHHeadAssembly) UnloadHead

func (self *LHHeadAssembly) UnloadHead(head *LHHead) error

UnloadHead unload a head from the assembly, return an error if the head is not loaded

type LHHeadAssemblyPosition

type LHHeadAssemblyPosition struct {
	Offset Coordinates3D
	Head   *LHHead
}

LHHeadAssemblyPosition a position within a head assembly

type LHInstruction

type LHInstruction struct {
	ID               string
	BlockID          BlockID
	Inputs           []*Liquid
	Outputs          []*Liquid
	ContainerType    string
	Welladdress      string
	PlateID          string
	Platetype        string
	Vol              float64
	Type             int
	Conc             float64
	Tvol             float64
	Majorlayoutgroup int

	PlateName string
	OutPlate  *Plate
	Message   string
	WaitTime  time.Duration
	// contains filtered or unexported fields
}

high-level instruction to a liquid handler

func NewLHMixInstruction

func NewLHMixInstruction() *LHInstruction

func NewLHPromptInstruction

func NewLHPromptInstruction() *LHInstruction

func NewLHSplitInstruction

func NewLHSplitInstruction() *LHInstruction

func (*LHInstruction) AddInput

func (inst *LHInstruction) AddInput(cmp *Liquid)

func (*LHInstruction) AddOutput

func (inst *LHInstruction) AddOutput(cmp *Liquid)

func (*LHInstruction) AdjustVolumesBy

func (ins *LHInstruction) AdjustVolumesBy(r float64)

func (*LHInstruction) ComponentsMoving

func (ins *LHInstruction) ComponentsMoving() []*Liquid

func (*LHInstruction) DupLiquids

func (ins *LHInstruction) DupLiquids()

func (*LHInstruction) Generation

func (ins *LHInstruction) Generation() int

func (*LHInstruction) GetID

func (inst *LHInstruction) GetID() string

GetID returns the ID of the instruction, useful for interfaces

func (*LHInstruction) HasAnyParent

func (ins *LHInstruction) HasAnyParent() bool

func (*LHInstruction) HasParent

func (ins *LHInstruction) HasParent(id string) bool

func (*LHInstruction) InputVolumeMap

func (ins *LHInstruction) InputVolumeMap(addition wunit.Volume) map[string]wunit.Volume

func (*LHInstruction) InsType

func (inst *LHInstruction) InsType() string

func (*LHInstruction) IsDummy

func (ins *LHInstruction) IsDummy() bool

IsDummy return true if the instruction has no effect

func (*LHInstruction) IsMixInPlace

func (ins *LHInstruction) IsMixInPlace() bool

func (*LHInstruction) NamesOfComponentsMoving

func (ins *LHInstruction) NamesOfComponentsMoving() string

func (*LHInstruction) ParentString

func (ins *LHInstruction) ParentString() string

func (*LHInstruction) SetGeneration

func (ins *LHInstruction) SetGeneration(i int)

func (*LHInstruction) SetPlateID

func (ins *LHInstruction) SetPlateID(pid string)

func (LHInstruction) String

func (ins LHInstruction) String() string

func (*LHInstruction) Summarize

func (ins *LHInstruction) Summarize(indent int) string

Summarize get a string summary of the instruction for end users

func (*LHInstruction) Wellcoords

func (ins *LHInstruction) Wellcoords() WellCoords

type LHInstructions

type LHInstructions map[string]*LHInstruction

func (LHInstructions) AssertDestinationsSet

func (insts LHInstructions) AssertDestinationsSet() error

AssertDestinationsSet make certain that a destination has been set for each instruction, returning a descriptive error if not

func (LHInstructions) AssertMixResultsCorrect

func (insts LHInstructions) AssertMixResultsCorrect() error

assertMixResultsCorrect checks that volumes of the mix result matches either the sum of the input, or the total volume if specified

func (LHInstructions) AssertNoPointerReuse

func (insts LHInstructions) AssertNoPointerReuse() error

AssertNoPointerReuse make certain that inputs and outputs are not shared among LHInstructions as should be ensured by calling DupLiquids()

func (LHInstructions) AssertTotalVolumesMatch

func (insts LHInstructions) AssertTotalVolumesMatch() error

assertTotalVolumesMatch checks that component total volumes are all the same in mix instructions

func (LHInstructions) AssertVolumesNonNegative

func (insts LHInstructions) AssertVolumesNonNegative() error

assertVolumesNonNegative tests that the volumes within the LHRequest are zero or positive

func (LHInstructions) DupLiquids

func (insts LHInstructions) DupLiquids()

DupLiquids duplicate the input and output liquids for each LHInstruction, thereby making certain that there can be no pointer-reuse between the instructions

type LHMultiChannelConstraint

type LHMultiChannelConstraint struct {
	X int
	Y int
	M int
}

what constraints apply to adjacent channels

func (LHMultiChannelConstraint) Equals

func (LHMultiChannelConstraint) Satisfied

func (lhmcc LHMultiChannelConstraint) Satisfied(wc1, wc2 WellCoords) bool

func (LHMultiChannelConstraint) SatisfiedV

func (lhmcc LHMultiChannelConstraint) SatisfiedV(awc1, awc2 []WellCoords) bool

type LHNumericCondition

type LHNumericCondition struct {
	Upper float64
	Lower float64
}

func (LHNumericCondition) IsEqualTo

func (lhnc LHNumericCondition) IsEqualTo(other LHCondition) bool

func (LHNumericCondition) Match

func (lhnc LHNumericCondition) Match(v interface{}) bool

func (LHNumericCondition) Type

func (lhnc LHNumericCondition) Type() string

type LHObject

type LHObject interface {
	//GetPosition get the absolute position of the object (mm)
	GetPosition() Coordinates3D
	//GetSize get the size of the object (mm)
	GetSize() Coordinates3D
	//GetBoxIntersections get a list of LHObjects (can be this object or children) which intersect with the BBox
	GetBoxIntersections(BBox) []LHObject
	//GetPointIntersections get a list of LHObjects (can be this object or children) which intersect with the given point
	GetPointIntersections(Coordinates3D) []LHObject
	//SetOffset set the offset of the object relative to its parent (global if parent is nil)
	SetOffset(Coordinates3D) error
	//SetParent Store the offset of the object
	SetParent(LHObject) error
	//ClearParent Clear the parent of the object
	ClearParent()
	//GetParent
	GetParent() LHObject
	//GetID
	GetID() string
	//Dup duplicate the object, optionally keeping the IDs identical
	Duplicate(bool) LHObject
	//DimensionsString returns a string description of the position and size of the object and its children.
	//useful for debugging
	DimensionsString() string
}

LHObject Provides a unified interface to physical size and location of objects that exist within a liquid handler

func GetObjectRoot

func GetObjectRoot(o LHObject) LHObject

GetObjectRoot get the highest parent

func UnmarshalDeckObject

func UnmarshalDeckObject(data []byte) (LHObject, error)

UnmarshalDeckObject unmarshal an on-deck object serialised with MarshalDeckObject retaining the correct underlying type

type LHParent

type LHParent interface {
	//GetChild get the child in the specified slot, nil if none. bool is false if the slot doesn't exists
	GetChild(string) (LHObject, bool)
	//GetSlotNames get a list of the slots
	GetSlotNames() []string
	//SetChild put the object in the slot
	SetChild(string, LHObject) error
	//Accepts test if slot can accept a certain class
	Accepts(string, LHObject) bool
	//GetSlotSize
	GetSlotSize(string) Coordinates2D
}

LHParent An LHObject that can hold other LHObjects

type LHPlate

type LHPlate = Plate

LHPlate is an alias for Plate to preserve backwards compatibility. Plate is the principle type for Liquid handling Plates in Antha. The structure describing a microplate.

type LHPolicy

type LHPolicy map[string]interface{}

LHPolicy defines parameters for a liquid handling policy. Valid key and value pairs are found aparam.go

func AdjustPostMixVolume

func AdjustPostMixVolume(mixToVol wunit.Volume) LHPolicy

func AdjustPreMixVolume

func AdjustPreMixVolume(mixToVol wunit.Volume) LHPolicy

func DupLHPolicy

func DupLHPolicy(in LHPolicy) LHPolicy

func GetPolicyByName

func GetPolicyByName(policyname PolicyName) (lhpolicy LHPolicy, err error)

func GetPolicyByType

func GetPolicyByType(liquidType LiquidType) (lhpolicy LHPolicy, err error)

GetPolicyByType will return the default LHPolicy corresponding to a LiquidType. An error is returned if an invalid liquidType is specified.

func MakeCarbonSourcePolicy

func MakeCarbonSourcePolicy() LHPolicy

func MakeColonyMixPolicy

func MakeColonyMixPolicy() LHPolicy

func MakeColonyPolicy

func MakeColonyPolicy() LHPolicy

func MakeCulturePolicy

func MakeCulturePolicy() LHPolicy

func MakeCultureReusePolicy

func MakeCultureReusePolicy() LHPolicy

func MakeDNACELLSMixMultiPolicy

func MakeDNACELLSMixMultiPolicy() LHPolicy

func MakeDNACELLSMixPolicy

func MakeDNACELLSMixPolicy() LHPolicy

func MakeDNAMixMultiPolicy

func MakeDNAMixMultiPolicy() LHPolicy

func MakeDNAMixPolicy

func MakeDNAMixPolicy() LHPolicy

func MakeDNAPolicy

func MakeDNAPolicy() LHPolicy

func MakeDefaultPolicy

func MakeDefaultPolicy() LHPolicy

func MakeDetergentPolicy

func MakeDetergentPolicy() LHPolicy

func MakeDispenseAboveLiquidMultiPolicy

func MakeDispenseAboveLiquidMultiPolicy() LHPolicy

func MakeDispenseAboveLiquidPolicy

func MakeDispenseAboveLiquidPolicy() LHPolicy

func MakeGlycerolPolicy

func MakeGlycerolPolicy() LHPolicy

func MakeHVFlowRatePolicy

func MakeHVFlowRatePolicy() LHPolicy

func MakeHVOffsetPolicy

func MakeHVOffsetPolicy() LHPolicy

func MakeJBPolicy

func MakeJBPolicy() LHPolicy

func MakeLVDNAMixPolicy

func MakeLVDNAMixPolicy() LHPolicy

func MakeLVExtraPolicy

func MakeLVExtraPolicy() LHPolicy

func MakeLoadPolicy

func MakeLoadPolicy() LHPolicy

func MakeLoadWaterPolicy

func MakeLoadWaterPolicy() LHPolicy

func MakeMultiWaterPolicy

func MakeMultiWaterPolicy() LHPolicy

func MakeNeedToMixPolicy

func MakeNeedToMixPolicy() LHPolicy

func MakeNitrogenSourcePolicy

func MakeNitrogenSourcePolicy() LHPolicy

func MakePEGPolicy

func MakePEGPolicy() LHPolicy

func MakePaintPolicy

func MakePaintPolicy() LHPolicy

func MakePlateOutPolicy

func MakePlateOutPolicy() LHPolicy

func MakeProteinPolicy

func MakeProteinPolicy() LHPolicy

func MakeProtoplastPolicy

func MakeProtoplastPolicy() LHPolicy

func MakeSingleChannelPolicy

func MakeSingleChannelPolicy() LHPolicy

func MakeSmartMixSingleChannelPolicy

func MakeSmartMixSingleChannelPolicy() LHPolicy

func MakeSolventPolicy

func MakeSolventPolicy() LHPolicy

func MakeTOPolicy

func MakeTOPolicy() LHPolicy

func MakeViscousPolicy

func MakeViscousPolicy() LHPolicy

func MakeWaterPolicy

func MakeWaterPolicy() LHPolicy

func MakeXYOffsetTestPolicy

func MakeXYOffsetTestPolicy() LHPolicy

func MegaMixPolicy

func MegaMixPolicy() LHPolicy

func NewLHPolicy

func NewLHPolicy() LHPolicy

NewLHPolicy generates an empty LHPolicy

func PostMixPolicy

func PostMixPolicy() LHPolicy

func PreMixPolicy

func PreMixPolicy() LHPolicy

func SmartMixPolicy

func SmartMixPolicy() LHPolicy

3 post mixes of the sample being transferred. Volume is adjusted based upon the volume of liquid in the destination well. No tip reuse permitted. Rules added to adjust post mix volume based on volume of the destination well. volume now capped at max for tip type (MIX_VOLUME_OVERRIDE_TIP_MAX)

func TurnOffBlowoutPolicy

func TurnOffBlowoutPolicy() LHPolicy

func TurnOffPostMix

func TurnOffPostMix() LHPolicy

func TurnOffPostMixAndPermitTipReUse

func TurnOffPostMixAndPermitTipReUse() LHPolicy

func (LHPolicy) IsEqualTo

func (lhp LHPolicy) IsEqualTo(lh2 LHPolicy) bool

func (LHPolicy) MergeWith

func (lhp LHPolicy) MergeWith(other LHPolicy) LHPolicy

clobber everything in here with the other policy then return the merged copy

func (LHPolicy) Name

func (policy LHPolicy) Name() string

Name returns the name of an LHPolicy as a string

func (*LHPolicy) Set

func (plhp *LHPolicy) Set(item string, value interface{}) error

func (*LHPolicy) SetName

func (policy *LHPolicy) SetName(name string) error

SetName sets the name of an LHPolicy.

func (*LHPolicy) UnmarshalJSON

func (plhp *LHPolicy) UnmarshalJSON(data []byte) error

type LHPolicyRule

type LHPolicyRule struct {
	Name       string
	Conditions []LHVariableCondition
	Priority   int
	Type       int // AND =0 OR = 1
}

conditions are ANDed together there is no chaining

func NewLHPolicyRule

func NewLHPolicyRule(name string) LHPolicyRule

func (*LHPolicyRule) AddCategoryConditionOn

func (lhpr *LHPolicyRule) AddCategoryConditionOn(variable, category string) error

func (*LHPolicyRule) AddNumericConditionOn

func (lhpr *LHPolicyRule) AddNumericConditionOn(variable string, low, up float64) error

func (LHPolicyRule) HasCondition

func (lhpr LHPolicyRule) HasCondition(cond LHVariableCondition) bool

func (LHPolicyRule) IsEqualTo

func (lhpr LHPolicyRule) IsEqualTo(other LHPolicyRule) bool

this just looks for the same conditions, doesn't matter if the rules lead to different outcomes... not sure if this quite gives us the right behaviour but let's plough on for now

type LHPolicyRuleSet

type LHPolicyRuleSet struct {
	Policies map[string]LHPolicy
	Rules    map[string]LHPolicyRule
	Options  map[string]interface{}
}

func AddUniversalRules

func AddUniversalRules(originalRuleSet *LHPolicyRuleSet, policies map[string]LHPolicy) (lhpr *LHPolicyRuleSet, err error)

func CloneLHPolicyRuleSet

func CloneLHPolicyRuleSet(parent *LHPolicyRuleSet) *LHPolicyRuleSet

func GetLHPolicyForTest

func GetLHPolicyForTest() (*LHPolicyRuleSet, error)

GetLHPolicyForTest gets a set of Test LHPolicies for unit tests. This is not guaranteed to be consistent with the default system policies returned from GetSystemLHPolicies().

func GetSystemLHPolicies

func GetSystemLHPolicies() (*LHPolicyRuleSet, error)

GetSystemLHPolicies is used to set the default System Policies.

func NewLHPolicyRuleSet

func NewLHPolicyRuleSet() *LHPolicyRuleSet

func (*LHPolicyRuleSet) AddRule

func (lhpr *LHPolicyRuleSet) AddRule(rule LHPolicyRule, consequent LHPolicy)

func (LHPolicyRuleSet) GetEquivalentRuleTo

func (lhpr LHPolicyRuleSet) GetEquivalentRuleTo(rule LHPolicyRule) string

func (*LHPolicyRuleSet) IsEqualTo

func (lhpr *LHPolicyRuleSet) IsEqualTo(lhp2 *LHPolicyRuleSet) bool

func (*LHPolicyRuleSet) MergeWith

func (lhpr *LHPolicyRuleSet) MergeWith(policyToMerge *LHPolicyRuleSet)

MergeWith merges the policyToMerge with the current LHPolicyRuleSet. if equivalent rules are found in the policyToMerge these are given priority over the existing rules.

func (*LHPolicyRuleSet) SetOption

func (lhpr *LHPolicyRuleSet) SetOption(optname string, value interface{}) error

type LHPosition

type LHPosition struct {
	Name     string        // human readable name of the position chosen by device driver
	Location Coordinates3D // absolute position of read left corner of the position
	Size     Coordinates2D // size of the position - equal to the footprint of objects which can be accepted
}

describes a position on the liquid handling deck

func NewLHPosition

func NewLHPosition(name string, location Coordinates3D, size Coordinates2D) *LHPosition

NewLHPosition constructs a new position on a liquidhandling deck

type LHSolution

type LHSolution struct {
	ID               string
	BlockID          BlockID
	Inst             string
	SName            string
	Order            int
	Components       []*Liquid
	ContainerType    string
	Welladdress      string
	Plateaddress     string
	PlateID          string
	Platetype        string
	Vol              float64 // in S.I units only for now
	Type             string
	Conc             float64
	Tvol             float64
	Majorlayoutgroup int
	Minorlayoutgroup int
}

structure describing a solution: a combination of liquid components deprecated and no longer used... may well need to be deleted

func NewLHSolution

func NewLHSolution() *LHSolution

func New_Solution

func New_Solution() *LHSolution

func (*LHSolution) GetAssignment

func (lhs *LHSolution) GetAssignment() string

func (LHSolution) GetComponentVolume

func (sol LHSolution) GetComponentVolume(key string) float64

func (LHSolution) String

func (sol LHSolution) String() string

type LHTip

type LHTip struct {
	ID              string
	Type            string
	Mnfr            string
	Dirty           bool
	MaxVol          wunit.Volume
	MinVol          wunit.Volume
	Shape           *Shape
	Bounds          BBox
	EffectiveHeight float64

	Filtered bool
	// contains filtered or unexported fields
}

TODO remove BBox once shape implements LHObject

func CopyTip

func CopyTip(tt LHTip) *LHTip

func NewLHTip

func NewLHTip(mfr, ttype string, minvol, maxvol float64, volunit string, filtered bool, shape *Shape, effectiveHeightMM float64) *LHTip

func (*LHTip) AddComponent

func (self *LHTip) AddComponent(v *Liquid) error

@implement LHContainer

func (*LHTip) ClearParent

func (self *LHTip) ClearParent()

@implement LHObject

func (*LHTip) Contents

func (self *LHTip) Contents() *Liquid

@implement LHContainer

func (*LHTip) CurrentVolume

func (self *LHTip) CurrentVolume() wunit.Volume

@implement LHContainer

func (*LHTip) CurrentWorkingVolume

func (self *LHTip) CurrentWorkingVolume() wunit.Volume

@implement LHContainer

func (*LHTip) DimensionsString

func (self *LHTip) DimensionsString() string

DimensionsString returns a string description of the position and size of the object and its children.

func (*LHTip) Dup

func (tip *LHTip) Dup() *LHTip

Dup copy the tip generating a new ID

func (*LHTip) DupKeepID

func (tip *LHTip) DupKeepID() *LHTip

Dup copy the tip keeping the previous ID

func (*LHTip) Duplicate

func (self *LHTip) Duplicate(keepIDs bool) LHObject

Duplicate copies an LHObject

func (*LHTip) GetBoxIntersections

func (self *LHTip) GetBoxIntersections(box BBox) []LHObject

@implement LHObject

func (*LHTip) GetClass

func (self *LHTip) GetClass() string

@implement Classy

func (*LHTip) GetEffectiveHeight

func (self *LHTip) GetEffectiveHeight() float64

GetEffectiveHeight get the height of the tip when actually loaded onto a channel

func (*LHTip) GetID

func (self *LHTip) GetID() string

func (*LHTip) GetName

func (self *LHTip) GetName() string

@implement Named

func (*LHTip) GetParams

func (tip *LHTip) GetParams() *LHChannelParameter

func (*LHTip) GetParent

func (self *LHTip) GetParent() LHObject

@implement LHObject

func (*LHTip) GetPointIntersections

func (self *LHTip) GetPointIntersections(point Coordinates3D) []LHObject

@implement LHObject

func (*LHTip) GetPosition

func (self *LHTip) GetPosition() Coordinates3D

@implement LHObject

func (*LHTip) GetSize

func (self *LHTip) GetSize() Coordinates3D

@implement LHObject

func (*LHTip) GetType

func (self *LHTip) GetType() string

@implement Typed

func (*LHTip) IsEmpty

func (self *LHTip) IsEmpty() bool

func (*LHTip) IsNil

func (tip *LHTip) IsNil() bool

func (*LHTip) MarshalJSON

func (self *LHTip) MarshalJSON() ([]byte, error)

func (*LHTip) RemoveVolume

func (self *LHTip) RemoveVolume(v wunit.Volume) (*Liquid, error)

@implement LHContainer

func (*LHTip) ResidualVolume

func (self *LHTip) ResidualVolume() wunit.Volume

@implement LHContainer

func (*LHTip) SetContents

func (self *LHTip) SetContents(v *Liquid) error

SetContents set the contents of the tip, returns an error if the tip is overfilled

func (*LHTip) SetOffset

func (self *LHTip) SetOffset(point Coordinates3D) error

@implement LHObject

func (*LHTip) SetParent

func (self *LHTip) SetParent(o LHObject) error

@implement LHObject

func (*LHTip) UnmarshalJSON

func (self *LHTip) UnmarshalJSON(data []byte) error

type LHTipbox

type LHTipbox struct {
	ID         string
	Boxname    string
	Type       string
	Mnfr       string
	Nrows      int
	Ncols      int
	Height     float64
	Tiptype    *LHTip
	AsWell     *LHWell
	NTips      int
	Tips       [][]*LHTip // Tips[row][col]
	TipXOffset float64
	TipYOffset float64
	TipXStart  float64
	TipYStart  float64
	TipZStart  float64

	Bounds BBox
	// contains filtered or unexported fields
}

func NewLHTipbox

func NewLHTipbox(nrows, ncols int, size Coordinates3D, manufacturer, boxtype string, tiptype *LHTip, well *LHWell, tipxoffset, tipyoffset, tipxstart, tipystart, tipzstart float64) *LHTipbox

func (*LHTipbox) AddressExists

func (tb *LHTipbox) AddressExists(c WellCoords) bool

func (*LHTipbox) ClearParent

func (self *LHTipbox) ClearParent()

@implement LHObject

func (*LHTipbox) CoordsToWellCoords

func (tb *LHTipbox) CoordsToWellCoords(r Coordinates3D) (WellCoords, Coordinates3D)

func (*LHTipbox) DimensionsString

func (self *LHTipbox) DimensionsString() string

DimensionsString returns a string description of the position and size of the object and its children. useful for debugging

func (*LHTipbox) Dup

func (tb *LHTipbox) Dup() *LHTipbox

func (*LHTipbox) DupKeepIDs

func (tb *LHTipbox) DupKeepIDs() *LHTipbox

func (*LHTipbox) Duplicate

func (self *LHTipbox) Duplicate(keepIDs bool) LHObject

Duplicate copies an LHObject

func (*LHTipbox) GetBoxIntersections

func (self *LHTipbox) GetBoxIntersections(box BBox) []LHObject

func (*LHTipbox) GetChildByAddress

func (tb *LHTipbox) GetChildByAddress(c WellCoords) LHObject

func (*LHTipbox) GetClass

func (self *LHTipbox) GetClass() string

func (LHTipbox) GetID

func (tb LHTipbox) GetID() string

func (*LHTipbox) GetName

func (tb *LHTipbox) GetName() string

func (*LHTipbox) GetParent

func (self *LHTipbox) GetParent() LHObject

func (*LHTipbox) GetPointIntersections

func (self *LHTipbox) GetPointIntersections(point Coordinates3D) []LHObject

func (*LHTipbox) GetPosition

func (self *LHTipbox) GetPosition() Coordinates3D

func (*LHTipbox) GetSize

func (self *LHTipbox) GetSize() Coordinates3D

func (*LHTipbox) GetTipBounds

func (self *LHTipbox) GetTipBounds() BBox

func (*LHTipbox) GetTips

func (tb *LHTipbox) GetTips(mirror bool, multi int, orient ChannelOrientation) []string

deprecated shortly

func (*LHTipbox) GetTipsMasked

func (tb *LHTipbox) GetTipsMasked(mask []bool, ori ChannelOrientation, canTrim bool) ([]string, error)

find tips that fit the pattern and return in the same format

func (*LHTipbox) GetType

func (tb *LHTipbox) GetType() string

func (*LHTipbox) HasEnoughTips

func (tb *LHTipbox) HasEnoughTips(requested int) bool

HasEnoughTips returns true if the tipbox has at least requested tips equivalent to tb.N_clean_tips() > requested

func (*LHTipbox) HasTipAt

func (tb *LHTipbox) HasTipAt(c WellCoords) bool

HasTipAt

func (*LHTipbox) MarshalJSON

func (tb *LHTipbox) MarshalJSON() ([]byte, error)

func (*LHTipbox) NCols

func (self *LHTipbox) NCols() int

func (*LHTipbox) NRows

func (self *LHTipbox) NRows() int

func (*LHTipbox) N_clean_tips

func (tb *LHTipbox) N_clean_tips() int

func (LHTipbox) Output

func (tb LHTipbox) Output() string

func (*LHTipbox) PutTip

func (tb *LHTipbox) PutTip(c WellCoords, tip *LHTip) bool

PutTip

func (*LHTipbox) Refill

func (tb *LHTipbox) Refill()

func (*LHTipbox) Refresh

func (tb *LHTipbox) Refresh()

func (*LHTipbox) Remove

func (tb *LHTipbox) Remove(sa []string) bool

func (*LHTipbox) RemoveTip

func (tb *LHTipbox) RemoveTip(c WellCoords) *LHTip

RemoveTip

func (*LHTipbox) SetOffset

func (self *LHTipbox) SetOffset(o Coordinates3D) error

func (*LHTipbox) SetParent

func (self *LHTipbox) SetParent(p LHObject) error

func (LHTipbox) String

func (tb LHTipbox) String() string

func (*LHTipbox) UnmarshalJSON

func (tb *LHTipbox) UnmarshalJSON(data []byte) error

func (*LHTipbox) WellCoordsToCoords

func (tb *LHTipbox) WellCoordsToCoords(wc WellCoords, r WellReference) (Coordinates3D, bool)

type LHTipwaste

type LHTipwaste struct {
	Name       string
	ID         string
	Type       string
	Mnfr       string
	Capacity   int
	Contents   int
	Height     float64
	WellXStart float64
	WellYStart float64
	WellZStart float64
	AsWell     *LHWell
	Bounds     BBox
	// contains filtered or unexported fields
}

func NewLHTipwaste

func NewLHTipwaste(capacity int, typ, mfr string, size Coordinates3D, w *LHWell, wellxstart, wellystart, wellzstart float64) *LHTipwaste

func (*LHTipwaste) AddressExists

func (self *LHTipwaste) AddressExists(c WellCoords) bool

func (*LHTipwaste) ClearParent

func (self *LHTipwaste) ClearParent()

@implement LHObject

func (*LHTipwaste) CoordsToWellCoords

func (self *LHTipwaste) CoordsToWellCoords(r Coordinates3D) (WellCoords, Coordinates3D)

func (*LHTipwaste) DimensionsString

func (self *LHTipwaste) DimensionsString() string

DimensionsString returns a string description of the position and size of the object and its children.

func (*LHTipwaste) Dispose

func (lht *LHTipwaste) Dispose(channels []*LHChannelParameter) ([]WellCoords, bool)

Dispose attempt to eject the tips from non-nil channels into the tipwaste. Returns a slice of well coordinates which specify where each tip should be ejected (undefined for nil channels), and a bool which is true if the tips were disposed of successfully, false if the tipbox is over capacity

func (*LHTipwaste) DisposeNum

func (lht *LHTipwaste) DisposeNum(num int) bool

func (*LHTipwaste) Dup

func (tw *LHTipwaste) Dup() *LHTipwaste

func (*LHTipwaste) DupKeepIDs

func (tw *LHTipwaste) DupKeepIDs() *LHTipwaste

func (*LHTipwaste) Duplicate

func (self *LHTipwaste) Duplicate(keepIDs bool) LHObject

Duplicate copies an LHObject

func (*LHTipwaste) Empty

func (lht *LHTipwaste) Empty()

func (*LHTipwaste) GetBoxIntersections

func (self *LHTipwaste) GetBoxIntersections(box BBox) []LHObject

func (*LHTipwaste) GetChildByAddress

func (self *LHTipwaste) GetChildByAddress(c WellCoords) LHObject

func (*LHTipwaste) GetClass

func (self *LHTipwaste) GetClass() string

func (*LHTipwaste) GetID

func (tw *LHTipwaste) GetID() string

func (*LHTipwaste) GetName

func (tw *LHTipwaste) GetName() string

func (*LHTipwaste) GetParent

func (self *LHTipwaste) GetParent() LHObject

func (*LHTipwaste) GetPointIntersections

func (self *LHTipwaste) GetPointIntersections(point Coordinates3D) []LHObject

func (*LHTipwaste) GetPosition

func (self *LHTipwaste) GetPosition() Coordinates3D

func (*LHTipwaste) GetSize

func (self *LHTipwaste) GetSize() Coordinates3D

func (*LHTipwaste) GetTargetOffset

func (self *LHTipwaste) GetTargetOffset(adaptorName string, channel int) Coordinates3D

GetTargetOffset get the offset for addressing a well with the named adaptor and channel

func (*LHTipwaste) GetTargets

func (self *LHTipwaste) GetTargets(adaptorName string) []Coordinates3D

GetTargets return all the defined targets for the named adaptor

func (*LHTipwaste) GetType

func (tw *LHTipwaste) GetType() string

func (*LHTipwaste) MarshalJSON

func (tw *LHTipwaste) MarshalJSON() ([]byte, error)

func (*LHTipwaste) NCols

func (self *LHTipwaste) NCols() int

func (*LHTipwaste) NRows

func (self *LHTipwaste) NRows() int

func (*LHTipwaste) SetOffset

func (self *LHTipwaste) SetOffset(o Coordinates3D) error

func (*LHTipwaste) SetParent

func (self *LHTipwaste) SetParent(p LHObject) error

func (LHTipwaste) SpaceLeft

func (tw LHTipwaste) SpaceLeft() int

func (LHTipwaste) String

func (te LHTipwaste) String() string

func (*LHTipwaste) UnmarshalJSON

func (tw *LHTipwaste) UnmarshalJSON(data []byte) error

func (*LHTipwaste) WellCoordsToCoords

func (self *LHTipwaste) WellCoordsToCoords(wc WellCoords, r WellReference) (Coordinates3D, bool)

type LHVariableCondition

type LHVariableCondition struct {
	TestVariable string
	Condition    LHCondition
}

func NewLHVariableCondition

func NewLHVariableCondition(testvariable string) LHVariableCondition

func (LHVariableCondition) IsEqualTo

func (lhvc LHVariableCondition) IsEqualTo(other LHVariableCondition) bool

func (*LHVariableCondition) SetCategoric

func (lhvc *LHVariableCondition) SetCategoric(category string) error

func (*LHVariableCondition) SetNumeric

func (lhvc *LHVariableCondition) SetNumeric(low, up float64) error

func (*LHVariableCondition) UnmarshalJSON

func (lh *LHVariableCondition) UnmarshalJSON(data []byte) error

type LHWell

type LHWell struct {
	ID        string
	Inst      string
	Crds      WellCoords
	MaxVol    float64 //Maximum total capacity of the well
	WContents *Liquid
	Rvol      float64 //Residual volume which can't be removed from the well
	WShape    *Shape
	Bottom    WellBottomType
	Bounds    BBox
	Bottomh   float64
	Extra     map[string]interface{}
	Plate     LHObject `gotopb:"-" json:"-"`
}

structure representing a well on a microplate - description of a destination

func Get_Next_Well

func Get_Next_Well(plate *Plate, component *Liquid, curwell *LHWell) (*LHWell, bool)

this function is somewhat buggy... need to define its responsibilities better

func NewLHWell

func NewLHWell(vunit string, vol, rvol float64, shape *Shape, bott WellBottomType, xdim, ydim, zdim, bottomh float64, dunit string) *LHWell

make a new well structure

func (*LHWell) AddComponent

func (w *LHWell) AddComponent(c *Liquid) error

AddComponent add some liquid to the well

func (*LHWell) CDup

func (lhw *LHWell) CDup() *LHWell

copy of type

func (*LHWell) CalculateMaxCrossSectionArea

func (lhw *LHWell) CalculateMaxCrossSectionArea() (ca wunit.Area, err error)

func (*LHWell) CalculateMaxVolume

func (lhw *LHWell) CalculateMaxVolume() (vol wunit.Volume, err error)

func (LHWell) CheckExtraKey

func (w LHWell) CheckExtraKey(s string) error

CheckExtraKey checks if the key is a reserved name

func (*LHWell) Clean

func (w *LHWell) Clean()

Clean resets the volume in the well so that it's empty

func (*LHWell) Clear

func (w *LHWell) Clear()

func (*LHWell) ClearParent

func (self *LHWell) ClearParent()

@implement LHObject

func (*LHWell) ClearUserAllocated

func (w *LHWell) ClearUserAllocated()

func (*LHWell) ContainerType

func (w *LHWell) ContainerType() string

func (*LHWell) Contains

func (w *LHWell) Contains(cmp *Liquid) bool

func (*LHWell) Contents

func (w *LHWell) Contents() *Liquid

func (*LHWell) CurrentVolume

func (w *LHWell) CurrentVolume() wunit.Volume

CurrentVolume return the volume of the component currently in the well

func (*LHWell) CurrentWorkingVolume

func (w *LHWell) CurrentWorkingVolume() wunit.Volume

CurrentWorkingVolume return the available working volume in the well - i.e. current volume minus residual volume

func (*LHWell) DeclareAutoallocated

func (well *LHWell) DeclareAutoallocated()

func (*LHWell) DeclareNotAutoallocated

func (well *LHWell) DeclareNotAutoallocated()

func (*LHWell) DimensionsString

func (self *LHWell) DimensionsString() string

DimensionsString returns a string description of the position and size of the object and its children.

func (*LHWell) Dup

func (lhw *LHWell) Dup() *LHWell

copy of instance

func (*LHWell) DupKeepIDs

func (lhw *LHWell) DupKeepIDs() *LHWell

func (*LHWell) Duplicate

func (self *LHWell) Duplicate(keepIDs bool) LHObject

Duplicate copies an LHObject

func (*LHWell) GetAfVFunc

func (lhw *LHWell) GetAfVFunc() wutil.Func1Prm

func (*LHWell) GetBoxIntersections

func (self *LHWell) GetBoxIntersections(box BBox) []LHObject

@implement LHObject

func (*LHWell) GetClass

func (self *LHWell) GetClass() string

@implement Classy

func (*LHWell) GetID

func (self *LHWell) GetID() string

func (*LHWell) GetName

func (self *LHWell) GetName() string

@implement Named

func (*LHWell) GetParent

func (self *LHWell) GetParent() LHObject

@implement LHObject

func (*LHWell) GetPointIntersections

func (self *LHWell) GetPointIntersections(point Coordinates3D) []LHObject

@implement LHObject

func (*LHWell) GetPosition

func (self *LHWell) GetPosition() Coordinates3D

@implement LHObject

func (*LHWell) GetSize

func (self *LHWell) GetSize() Coordinates3D

@implement LHObject

func (*LHWell) GetType

func (self *LHWell) GetType() string

@implement Typed

func (*LHWell) GetVolumeUnit

func (self *LHWell) GetVolumeUnit() string

func (*LHWell) GetWellCoords

func (self *LHWell) GetWellCoords() WellCoords

func (*LHWell) GetWellTargets

func (w *LHWell) GetWellTargets(adaptor string) []Coordinates3D

GetWellTargets return the well targets for the given adaptor if the adaptor has no defined targets, simply returns the well center

func (*LHWell) IsAutoallocated

func (well *LHWell) IsAutoallocated() bool

func (*LHWell) IsEmpty

func (w *LHWell) IsEmpty() bool

IsEmpty returns true if the well contains nothing, though this does not mean that the working volume is greater than zero

func (*LHWell) IsUserAllocated

func (w *LHWell) IsUserAllocated() bool

func (*LHWell) IsVolumeValid

func (w *LHWell) IsVolumeValid() bool

IsVolumeValid tests whether the volume in the well is within the allowable range

func (*LHWell) ListAdaptorsWithTargets

func (w *LHWell) ListAdaptorsWithTargets() []string

GetAdaptorsWithTargets gets the list of the names of adaptors which have targets defined for the well

func (*LHWell) Location_ID

func (lhw *LHWell) Location_ID() string

func (*LHWell) Location_Name

func (lhw *LHWell) Location_Name() string

func (*LHWell) MaxVolume

func (w *LHWell) MaxVolume() wunit.Volume

MaxVolume get the maximum working volume of the well

func (*LHWell) MaxWorkingVolume

func (w *LHWell) MaxWorkingVolume() wunit.Volume

MaxWorkingVolume get the total maximum working volume in the well, i.e. the max volume minus residual volume

func (*LHWell) PlateLocation

func (w *LHWell) PlateLocation() PlateLocation

func (*LHWell) RemoveCarry

func (w *LHWell) RemoveCarry(v wunit.Volume)

RemoveCarry Remove the carry volume

func (*LHWell) RemoveVolume

func (w *LHWell) RemoveVolume(v wunit.Volume) (*Liquid, error)

RemoveVolume remove some liquid from the well

func (*LHWell) ResetPlateID

func (w *LHWell) ResetPlateID(newID string)

func (*LHWell) ResidualVolume

func (w *LHWell) ResidualVolume() wunit.Volume

func (*LHWell) SetAfVFunc

func (lhw *LHWell) SetAfVFunc(f string)

func (*LHWell) SetContents

func (w *LHWell) SetContents(newContents *Liquid) error

func (*LHWell) SetOffset

func (self *LHWell) SetOffset(point Coordinates3D) error

@implement LHObject

func (*LHWell) SetParent

func (self *LHWell) SetParent(p LHObject) error

@implement LHObject

func (*LHWell) SetUserAllocated

func (w *LHWell) SetUserAllocated()

func (*LHWell) SetWellTargets

func (w *LHWell) SetWellTargets(adaptor string, offsets []Coordinates3D)

SetWellTargets sets the targets for each channel when accessing the well using adaptor. offsets is a list of coordinates which specify the offset in mm from the well center for each channel. len(offsets) specifies the maximum number of channels which can access the well simultaneously using adaptor

func (*LHWell) Shape

func (lhw *LHWell) Shape() *Shape

func (LHWell) String

func (w LHWell) String() string

func (*LHWell) UpdateContentID

func (w *LHWell) UpdateContentID(IDBefore string, after *Liquid) bool

func (*LHWell) ValidateVolume

func (w *LHWell) ValidateVolume() error

ValidateVolume validates that the volume in the well is within allowable range

func (*LHWell) XDim

func (w *LHWell) XDim() float64

func (*LHWell) YDim

func (w *LHWell) YDim() float64

func (*LHWell) ZDim

func (w *LHWell) ZDim() float64

type Liquid

type Liquid struct {
	ID                 string
	BlockID            BlockID
	DaughtersID        map[string]struct{}
	ParentID           string
	Inst               string
	Order              int
	CName              string
	Type               LiquidType
	Vol                float64
	Conc               float64
	Vunit              string
	Cunit              string
	Tvol               float64
	Smax               float64 // maximum solubility
	Visc               float64
	StockConcentration float64
	SubComponents      ComponentList // List of all sub components in the LHComponent.
	Extra              map[string]interface{}
	Loc                string // refactor to PlateLocation
	Destination        string
	Policy             LHPolicy // Policy is where a custom liquid policy is stored
}

Liquid is the principle liquid handling type in Antha. A liquid describes a liquid component and its desired properties

func CopyComponentArray

func CopyComponentArray(arin []*Liquid) []*Liquid

func NewLHComponent

func NewLHComponent() *Liquid

func (*Liquid) AddDNASequence

func (lhc *Liquid) AddDNASequence(seq DNASequence, options ...bool) error

AddDNASequence adds DNASequence to the LHComponent. If a Sequence already exists an error is returned and the sequence is not added unless an additional boolean argument (FORCEADD or true) is specified to ignore duplicates. A warning will be returned in either case if a duplicate sequence is already found.

func (*Liquid) AddDaughterComponent

func (cmp *Liquid) AddDaughterComponent(cmp2 *Liquid)

func (*Liquid) AddParentComponent

func (cmp *Liquid) AddParentComponent(cmp2 *Liquid)

func (*Liquid) AddPolicy

func (lhc *Liquid) AddPolicy(pol LHPolicy) error

func (*Liquid) AddSubComponent

func (cmp *Liquid) AddSubComponent(subcomponent *Liquid, conc wunit.Concentration) error

AddSubComponent adds a subcomponent with concentration to a component. An error is returned if subcomponent is already found.

func (*Liquid) AddSubComponents

func (cmp *Liquid) AddSubComponents(allsubComponents ComponentList) error

AddSubComponents adds a component list to a component. If a conflicting sub component concentration is already present then an error will be returned. To overwrite all subcomponents ignoring conficts, use OverWriteSubComponents.

func (*Liquid) AddVolumeRule

func (lhc *Liquid) AddVolumeRule(minvol, maxvol float64, pol LHPolicy) error

func (*Liquid) CNID

func (lhc *Liquid) CNID() string

func (*Liquid) Clean

func (cmp *Liquid) Clean()

Clean the component to its initial state

func (*Liquid) Concentration

func (lhc *Liquid) Concentration() (conc wunit.Concentration)

Concentration returns the Concentration of the LHComponent

func (*Liquid) Cp

func (lhc *Liquid) Cp() *Liquid

func (*Liquid) DNASequences

func (lhc *Liquid) DNASequences() ([]DNASequence, error)

DNASequences returns DNA Sequences asociated with an LHComponent. An error is also returned indicating whether a sequence was found.

func (*Liquid) DeclareInstance

func (lhc *Liquid) DeclareInstance()

func (*Liquid) DeclareNotInstance

func (lhc *Liquid) DeclareNotInstance()

func (*Liquid) Dup

func (lhc *Liquid) Dup() *Liquid

func (*Liquid) EqualTypeVolume

func (l1 *Liquid) EqualTypeVolume(l2 *Liquid) bool

func (*Liquid) EqualTypeVolumeID

func (l1 *Liquid) EqualTypeVolumeID(l2 *Liquid) bool

func (*Liquid) FindDNASequence

func (lhc *Liquid) FindDNASequence(seq DNASequence) (seqs []DNASequence, positions []int, err error)

FindDNASequence searches for the presence of a DNASequence in the LHComponent. Search is based upon both name of the sequence and sequence. If multiple copies of the sequence exists and error is returned. If a Sequence does not exist, the sequence is added and an error is returned.

func (Liquid) FullyQualifiedName

func (cmp Liquid) FullyQualifiedName() string

func (*Liquid) Generation

func (lhc *Liquid) Generation() int

func (*Liquid) GetClass

func (lhc *Liquid) GetClass() string

GetClass return the class of the object

func (*Liquid) GetConc

func (lhc *Liquid) GetConc() float64

func (*Liquid) GetConcentrationOf

func (c *Liquid) GetConcentrationOf(subComponentName string) (wunit.Concentration, error)

GetConcentrationOf attempts to retrieve the concentration of subComponentName in component. If the component name is equal to subComponentName, the concentration of the component itself is returned.

func (*Liquid) GetCunit

func (lhc *Liquid) GetCunit() string

func (*Liquid) GetExtra

func (lhc *Liquid) GetExtra() map[string]interface{}

func (Liquid) GetID

func (lhc Liquid) GetID() string

func (*Liquid) GetName

func (lhc *Liquid) GetName() string

GetName the component's name

func (*Liquid) GetPolicies

func (lhc *Liquid) GetPolicies() (*LHPolicyRuleSet, error)

func (*Liquid) GetSmax

func (lhc *Liquid) GetSmax() float64

func (*Liquid) GetSubComponents

func (cmp *Liquid) GetSubComponents() (ComponentList, error)

GetSubComponents returns a component list from a component

func (*Liquid) GetType

func (lhc *Liquid) GetType() string

func (*Liquid) GetVisc

func (lhc *Liquid) GetVisc() float64

func (*Liquid) GetVunit

func (lhc *Liquid) GetVunit() string

func (*Liquid) HasAnyParent

func (cmp *Liquid) HasAnyParent() bool

func (*Liquid) HasConcentration

func (lhc *Liquid) HasConcentration() bool

HasConcentration checks whether a Concentration is set for the LHComponent

func (*Liquid) HasDaughter

func (lhc *Liquid) HasDaughter(id string) bool

func (*Liquid) HasParent

func (lhc *Liquid) HasParent(s string) bool

func (*Liquid) HasSubComponent

func (c *Liquid) HasSubComponent(subComponentName string) bool

HasSubComponent evaluates if a sub component with subComponentName is found in component. If the component name is equal to subComponentName, true will be returned.

func (Liquid) IDOrName

func (cmp Liquid) IDOrName() string

func (*Liquid) IsInstance

func (lhc *Liquid) IsInstance() bool

func (*Liquid) IsSameKindAs

func (lhc *Liquid) IsSameKindAs(c2 *Liquid) bool

func (*Liquid) IsSample

func (cmp *Liquid) IsSample() bool

func (*Liquid) IsValuable

func (lhc *Liquid) IsValuable() bool

func (*Liquid) IsZero

func (lhc *Liquid) IsZero() bool

func (*Liquid) Kind

func (lhc *Liquid) Kind() string

func (*Liquid) Matches

func (cmp *Liquid) Matches(cmp2 *Liquid) bool

func (*Liquid) MeaningfulName

func (l *Liquid) MeaningfulName() string

MeaningfulName returns the name of the liquid if one has been explicitly set (e.g. with SetName) or the empty string if only an autogenerated name is available

func (*Liquid) Mix

func (cmp *Liquid) Mix(cmp2 *Liquid)

add cmp2 to cmp

func (*Liquid) MixPreserveTvol

func (cmp *Liquid) MixPreserveTvol(cmp2 *Liquid)

func (*Liquid) ModifyLHPolicyParameter

func (lhc *Liquid) ModifyLHPolicyParameter(parameter string, value interface{}) error

ModifyLHPolicyParameter specifies that this LHComponent or instance of the LHComponent should be handled with a modified LHPolicy parameter. e.g. to Change number of post mixes to 5: lhc.ModifyLHPolicyParameter("POST_MIX", 5) Valid parameters and value types are specified in aparam.go An error is returned if an invalid parameter or value type for that parameter is specified.

func (*Liquid) Name

func (lhc *Liquid) Name() string

Name returns the component name as a string

func (*Liquid) OverwriteSubComponents

func (cmp *Liquid) OverwriteSubComponents(allsubComponents ComponentList) error

OverwriteSubComponents Adds a component list to a component. Any existing component list will be overwritten. To add a ComponentList checking for duplicate entries, use AddSubComponents.

func (*Liquid) ParentTree

func (cmp *Liquid) ParentTree() graph.StringGraph

func (*Liquid) ParentTreeString

func (cmp *Liquid) ParentTreeString() string

graphviz format

func (*Liquid) PlateID

func (lhc *Liquid) PlateID() string

PlateID returns the id of a plate or the empty string

func (*Liquid) PlateLocation

func (lhc *Liquid) PlateLocation() PlateLocation

func (*Liquid) PolicyName

func (lhc *Liquid) PolicyName() PolicyName

PolicyName returns the PolicyName of the LHComponent's LiquidType

func (*Liquid) Remove

func (lhc *Liquid) Remove(v wunit.Volume) wunit.Volume

func (*Liquid) RemoveDNASequence

func (lhc *Liquid) RemoveDNASequence(seq DNASequence) error

RemoveDNASequence removes an existing DNASequence from the LHComponent. Search is based upon both name of the sequence and sequence. If multiple copies of the sequence exists and error is returned. If a Sequence does not exist, the sequence is added and an error is returned.

func (*Liquid) RemoveDNASequenceAtPosition

func (lhc *Liquid) RemoveDNASequenceAtPosition(position int) error

RemoveDNASequenceAtPosition removes a DNA sequence from a specific position. Designed for cases where FindDNASequnce() method returns multiple instances of the dna sequence.

func (*Liquid) RemoveDNASequences

func (lhc *Liquid) RemoveDNASequences() error

RemoveDNASequences removes all DNASequences from the component.

func (*Liquid) ReplaceDaughterID

func (cmp *Liquid) ReplaceDaughterID(ID1, ID2 string)

func (*Liquid) Sample

func (lhc *Liquid) Sample(v wunit.Volume) (*Liquid, error)

func (*Liquid) SetConcentration

func (lhc *Liquid) SetConcentration(conc wunit.Concentration)

SetConcentration sets a concentration to an LHComponent; assumes conc is valid; overwrites existing concentration

func (*Liquid) SetDNASequences

func (lhc *Liquid) SetDNASequences(seqs []DNASequence, options ...bool) error

SetDNASequences adds a set of DNASequences to the LHComponent. If a Sequence already exists an error is returned and the sequence is not added unless an additional boolean argument (FORCEADD or true) is specified to ignore duplicates. A warning will be returned in either case if a duplicate sequence is already found.

func (*Liquid) SetGeneration

func (lhc *Liquid) SetGeneration(i int)

func (*Liquid) SetName

func (lhc *Liquid) SetName(name string)

SetName adds the specified component name to the component.

func (*Liquid) SetPolicies

func (lhc *Liquid) SetPolicies(rs *LHPolicyRuleSet) error

in future this will be deprecated... should not let user completely reset policies

func (*Liquid) SetPolicyName

func (lhc *Liquid) SetPolicyName(policy PolicyName, options ...PolicyOption) error

SetPolicyName adds the LiquidType associated with a PolicyName to the LHComponent. If the PolicyName is invalid and the DoNotPermitCustomPolicies option is used as an argument then an error is returned. By default, custom policyNames may be added and the validity of these will be checked later when robot instructions are generated, rather than in the element.

func (*Liquid) SetSample

func (cmp *Liquid) SetSample(flag bool) bool

func (*Liquid) SetValue

func (lhc *Liquid) SetValue(b bool)

func (*Liquid) SetVolume

func (lhc *Liquid) SetVolume(v wunit.Volume)

SetVolume adds a volume to the component

func (*Liquid) SetWellLocation

func (lhc *Liquid) SetWellLocation(wellLocation string) error

SetWellLocation sets the well location to an LHComponent in A1 format.

func (*Liquid) String

func (cmp *Liquid) String() string

func (*Liquid) Summarize

func (lhc *Liquid) Summarize() string

Summarize describe the component in a user friendly manner

func (*Liquid) TotalVolume

func (lhc *Liquid) TotalVolume() wunit.Volume

func (*Liquid) TypeName

func (lhc *Liquid) TypeName() string

TypeName returns the PolicyName of the LHComponent's LiquidType as a string

func (*Liquid) UpdateDNASequence

func (lhc *Liquid) UpdateDNASequence(seq DNASequence) error

UpdateDNASequence replaces an existing DNASequence to the LHComponent. Search is based upon both name of the sequence and sequence. If multiple copies o