intbio-ncl / BiomationScripterLib

A Python library to assist with scripting bio-automation protocols
MIT License
3 stars 0 forks source link

EchoProto cannot handle reagents split across multiple source plates #29

Open Brad0440 opened 2 years ago

Brad0440 commented 2 years ago

This problems seems to occur when the same reagent is present across multiple source plates. Will investigate further to either raise an error when the user tries to do this (as a temp. solution), or make it so EchoProto can deal with this situation.

Originally posted by @Brad0440 in https://github.com/intbio-ncl/BiomationScripterLib/issues/26#issuecomment-1040502332

As noted above, if a reagent is found in multiple source plates, EchoProto correctly determines if enough of that source material is present, but errors occur when trying to determine the transfer events.

For now, it may be best to raise an error when this occurs and add support for the same reagents being present in multiple source plates in a later version.

Brad0440 commented 2 years ago

Extra information:

This error occurs in the BMS.EchoProto.Generate_Actions function.

This can be solved in one of two ways:

  1. Temporary solution: Add in a check to see if a reagent appears in multiple source plates, and if so raise an error
  2. Permanent: TransferList objects are used to store transfer events from one source plate to the destination plates. If a source material runs out, but is present in another plate, the additional transfer events should be added to the TransferList object for the other source plate in which the reagent appears