kalekundert / stepwise

Modular, command-line scientific protocols
GNU General Public License v3.0
3 stars 0 forks source link

Make it possible to convert between reagents and solvents #54

Closed kalekundert closed 2 years ago

kalekundert commented 3 years ago

This came up when I was writing a protocol (~dbp/protocols/cdna/ligate_mrna_linker.py) that basically worked by:

The most natural way to split reagents out of a reaction is to delete all to irrelevant reagents. (In principle the desired reagents could be placed into a new reaction, but this isn't currently supported because reagents hold references to their reaction.) The problem for this application is that:

This would be easy to do if "being a solvent" was simply a reagent attribute meaning "derive the volume from the total reaction volume", and was interpreted dynamically by the reaction. I think this is how I originally wanted to write this code, but there were difficulties...

kalekundert commented 2 years ago

This is fixed by the pin_volumes() method added in c6b2b00. I still don't feel like the whole API is quite right, but I'm going to close this issue for now.