コード例 #1
0
ファイル: Assembly.go プロジェクト: cgravill/antha
func Steps(params Parameters, inputs Inputs) Outputs {
	var outputs Outputs

	ctx := execution.GetContext()

	em := ctx.EquipmentManager
	rqout := em.MakeDeviceRequest("liquidhandler", "Manual")
	response := <-rqout

	// handle response problems
	if response["status"] == "FAIL" {
		log.Fatal("Error requesting liquid handler service")
	}

	liquidhandler := response["devicequeue"].(*execution.LiquidHandlingService)

	samples := make([]*wtype.LHComponent, 0)

	buffersample := mixer.SampleForTotalVolume(inputs.Buffer, params.Reactionvolume)
	samples = append(samples, buffersample)

	atpsample := mixer.Sample(inputs.ATP, params.Atpvol)
	samples = append(samples, atpsample)

	vectorsample := mixer.SampleForConcentration(inputs.Vector, params.Vectorconc)
	samples = append(samples, vectorsample)

	for _, part := range inputs.Parts {
		partsample := mixer.SampleForConcentration(part, params.Partconc)
		samples = append(samples, partsample)
	}

	resample := mixer.Sample(inputs.RestrictionEnzyme, params.Revol)
	samples = append(samples, resample)
	ligsample := mixer.Sample(inputs.Ligase, params.Ligvol)
	samples = append(samples, ligsample)
	reaction := mixer.MixInto(inputs.Outplate, samples...)
	// set the block ID
	reaction.BlockID = string(params.BlockID)

	rq2 := liquidhandler.MakeMixRequest(reaction)
	if rq2 == nil {
		log.Fatal("Error running liquid handling request")
	}

	rq2.Tip_Type = inputs.TipType
	liquidhandler.Run()

	// incubate the reaction mixtures

	incubate(reaction, params.Reactiontemp, params.Reactiontime, false)

	// inactivate

	incubate(reaction, params.Inactivationtemp, params.Inactivationtime, false)

	// all done
	outputs.Reaction = reaction
	return outputs
}
コード例 #2
0
// The core process for this protocol, with the steps to be performed
// for every input
func (e *TypeIISConstructAssembly) steps(p TypeIISConstructAssemblyParamBlock, r *TypeIISConstructAssemblyResultBlock) {
	_wrapper := execution.NewWrapper(p.ID)
	_ = _wrapper

	samples := make([]*wtype.LHComponent, 0)
	bufferSample := mixer.SampleForTotalVolume(p.Buffer, p.ReactionVolume)
	samples = append(samples, bufferSample)
	atpSample := mixer.Sample(p.Atp, p.AtpVol)
	samples = append(samples, atpSample)
	vectorSample := mixer.SampleForConcentration(p.Vector, p.VectorConc)
	samples = append(samples, vectorSample)

	for _, part := range p.Parts {
		partSample := mixer.SampleForConcentration(part, p.PartConc)
		samples = append(samples, partSample)
	}

	reSample := mixer.Sample(p.RestrictionEnzyme, p.ReVol)
	samples = append(samples, reSample)
	ligSample := mixer.Sample(p.Ligase, p.LigVol)
	samples = append(samples, ligSample)
	reaction := _wrapper.MixInto(p.OutPlate, samples...)

	// incubate the reaction mixture

	_wrapper.Incubate(reaction, p.ReactionTemp, p.ReactionTime, false)

	// inactivate

	_wrapper.Incubate(reaction, p.InactivationTemp, p.InactivationTime, false)

	// all done
	r.Reaction = reaction
}