kalekundert / stepwise

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

Allow multi-step master mixes #59

Closed kalekundert closed 2 years ago

kalekundert commented 2 years ago

I've started to think that the way I'm representing master mixes isn't right. Right now I basically just add a "master mix" column to a normal reaction table, but this approach has some downsides:

Pros:

Cons:

I think it might be good to refactor the MasterMix data model to comprise:

Like Protocol and (eventually) Reaction, MasterMix should primarily be a formatting class, but now its output would be a list of master mix steps with normal reaction tables for each one, e.g.:

- Set up a −template master mix:

  Reagent           Stock   Volume       12x
  ──────────────────────────────────────────
  water                    1.50 µL  18.00 µL
  primer mix          10x  0.50 µL   6.00 µL
  Q5 master mix        2x  2.50 µL  30.00 µL

- Setup the complete reactions:

  Reagent           Stock   Volume       12x
  ──────────────────────────────────────────
  −template mix            1.50 µL  18.00 µL
  p188           20 pg/µL  0.50 µL   6.00 µL
kalekundert commented 2 years ago

Reaction (and MasterMix) should both learn how to format complete steps, with the "Setup # type-of-reaction reactions:" line. These lines are something that I'm currently re-writing over and over. It would remain possible to get the individual reaction tables, there would just be an option to get a more plug-n-play protocol.

Broadly, I'm thinking about stepwise as a formatting library, so things like Reaction and MasterMix that are core to stepwise should have powerful formatting options.