This came up when I was writing a protocol (~dbp/protocols/cdna/ligate_mrna_linker.py) that basically worked by:
Creating a big reaction
Splitting some of the reagents out into a new reaction, with it's own incubation step.
Splitting the remaining reagents into another reaction, with a new reagent representing the first reaction.
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:
It's convenient to have a solvent when setting up the big reaction; e.g. because I can vary volumes without worrying about messing things up.
But I don't want there to be a solvent when deleting reagents, because the solvent will simply adjust its volume to account to the deleted reagents.
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...
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.
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...