Options: -v --volume <mL> [default: 40] Roughly how much stock solution you want to prepare. -c --conc <mM> [default: 30] The concentration of theophylline you want to prepare. Note that theophylline is a drug, and as such it is fairly toxic. Be careful not to inhale or ingest it and read the MSDS for more information. """ import docopt import dirty_water args = docopt.docopt(__doc__) protocol = dirty_water.Protocol() volume = eval(args['--volume']) conc = eval(args['--conc']) mw = 180.16 mg_theo = volume * conc * mw / 1000 mL_water = 1000 / mw / conc protocol += """\ Measure approximately {mg_theo:.1f} mg theophylline into a glass bottle with a stir bar.""" protocol += """\ Add {mL_water:.4f} mL water for each mg theophyline.""" protocol += """\
#!/usr/bin/env python3 """\ Transform an sgRNA library into yeast using the Benatuil electroporation protocol. Usage: yeast_library_prep.py <num_transformations> """ import docopt import dirty_water from nonstdlib import plural args = docopt.docopt(__doc__) N = int(eval(args['<num_transformations>'])) day_1 = dirty_water.Protocol() day_2 = dirty_water.Protocol() ## Day 1 ypd_mL = 40 * N overnight_mL = 0.3 * ypd_mL / 10.0 day_1 += f"""\ Prepare 10 81 cm² selective plates [1].""" sorbitol_mL = N * (115 + 5) sorbitol_g = sorbitol_mL * 182.17 / 1000 day_1 += f"""\ Prepare {sorbitol_mL} mL 1M sorbitol:
def test_protocol_str_steps(): protocol = dirty_water.Protocol() protocol += 'hello' protocol += 'world' assert str(protocol) == """\