Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple SPtype for different materials in SourcePlate #11

Open
hainesm6 opened this issue Jul 26, 2022 · 2 comments
Open

Multiple SPtype for different materials in SourcePlate #11

hainesm6 opened this issue Jul 26, 2022 · 2 comments

Comments

@hainesm6
Copy link

Problem

There are cases when materials in a SourcePlate require different SPtype values when transfering via the echo. For example, mammalian lysate require "384PP_AQ_GP" while water, DNA etc. requires "384PP_Plus_AQ_BP".

Potential solution

If there isn't an established solution to this problem, I'd recommend adding an optional argument to EchoRun.write_picklist method where the user can override plate.type for a given EchoSourceMaterial.name attribute. Something like passing in a iterable of tuples which override plate.type for the associated material e.g.

[("txtl_mm", "384_Plus_AQ_GP")]

Would mean all rows where txtl_mm is transfered, use the associated 384_Plus_AQ_GP plate type and everything else is transfered with the default. Let me know if this is works and I'd be happy to make the changes and write associated tests.

@murrayrm
Copy link

murrayrm commented Jul 30, 2022

@hainesm6 I'm not sure that @sclamons and/or @WilliamIX are actively maintaining this package or not, so I'll respond (always dangerous -:).

Your solution sounds fine, though you might want to use a dict instead of a tuple and use a regex for the name, with the idea that the first matching entry gets used. So if you set plate.type to '384_Plus_AQ_GP' then it uses that for the entire plate, but if you set it to {r'txtl_mm*': '384_Plus_AQ_GP', r'*': 'default'} then you get '384_Plus_AQ_GP' for anything that is txtl_mm* and 'default' for everything else.

@hainesm6
Copy link
Author

hainesm6 commented Aug 5, 2022

Thanks @murrayrm! Yes agreed, a dict would improve readability and regex seems sensible in case there are multiple materials where an overide is required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants