Last active
May 19, 2024 02:11
-
-
Save marcosfelt/b776a2735ae4e120db6a83eb5f89b973 to your computer and use it in GitHub Desktop.
Scheduler
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from dataclasses import dataclass | |
| import pylaborchestrate as plo | |
| from pylabrobot.resources import ( | |
| TIP_CAR_480_A00, | |
| PLT_CAR_L5AC_A00, | |
| Cos_96_DW_1mL, | |
| HTF_L | |
| ) | |
| from pylabrobot.resources import Deck, TipRack, Plate | |
| from pylabrobot.liquid_handling import LiquidHandler | |
| from pylabrobot.liquid_handling.backends import STAR | |
| from pylabrobot.resources.hamilton import STARLetDeck | |
| from plo import ProtocolStep | |
| class SerialDilution(ProtocolStep): | |
| def setup_machine(self, **kwargs)-> LiquidHandler: | |
| # Setup liquid handler | |
| backend = STAR() | |
| lh = LiquidHandler(backend=backend, deck=STARLetDeck()) | |
| # Tips | |
| tip_car = TIP_CAR_480_A00(name='tip carrier') | |
| tip_car[0] = HTF_L(name='tips_01') | |
| lh.deck.assign_child_resource(tip_car, rails=3) | |
| # Add a mwp | |
| plt_car = PLT_CAR_L5AC_A00(name='plate carrier') | |
| plt_car[0] = Cos_96_DW_1mL(name='plate_01') | |
| lh.deck.assign_child_resource(plt_car, rails=15) | |
| return lh | |
| async def run(self, lh: LiquidHandler, **kwargs): | |
| await lh.pick_up_tips(lh.deck.get_resource("tip_rack")["A1"]) | |
| await lh.aspirate(lh.deck.get_resource("plate")["A1"], vols=100) | |
| await lh.dispense(lh.deck.get_resource("plate")["A2"], vols=100) | |
| await lh.return_tips() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from dataclasses import dataclass | |
| from typing import Callable, Dict | |
| class ProtocolStep: | |
| pass | |
| class Protocol: | |
| pass | |
| @datclass | |
| class MachineGraph: | |
| pass | |
| @dataclass | |
| class Scheduler: | |
| protocols: Dict[str, Callable] | |
| machine_graph: MachineGraph | |
| def schedule_protocol(self, protocol_id: str): | |
| pass | |
| def status(self): | |
| pass | |
| def stop(self, protocol_id): | |
| pass | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment