Esempio n. 1
0
    def get_reaction(self):
        rxn = MasterMix(self.buffers[self.transfer_type])
        rxn.extra_percent = 20
        rxn.extra_min_volume = '1 µL'

        if isinstance(self.samples, int):
            rxn.num_reactions = self.samples
        else:
            rxn['DNA'].name = ','.join(self.samples)
            rxn.num_reactions = len(self.samples)

        if x := self.num_spots:
            rxn.num_reactions = x
Esempio n. 2
0
def test_master_mix_scale(params):
    mm = MasterMix()
    mm.num_reactions = params['n']
    mm.solvent = 'w'
    mm.volume = params['vol_rxn']
    mm['x'].volume = params['vol_x']
    mm['w'].master_mix = True
    mm['x'].master_mix = True

    if 'fraction' in params:
        mm.extra_fraction = params['fraction']
        assert mm.extra_percent == pytest.approx(params['fraction'] * 100)
    if 'percent' in params:
        mm.extra_percent = params['percent']
        assert mm.extra_fraction == pytest.approx(params['percent'] / 100)
    if 'reactions' in params:
        mm.extra_reactions = params['reactions']
    if 'min_vol' in params:
        mm.extra_min_volume = params['min_vol']

    assert mm.get_scale() == pytest.approx(params['expected'])
Esempio n. 3
0
import stepwise
from inform import plural
from stepwise import Protocol, Step, Footnote, MasterMix

p = Protocol()
n = 6

loading_buf = MasterMix("""\
Reagent                 Stock     Volume MM?
======================  =====  ========= ===
water                          to 5.0 µL   y
Bolt LDS sample buffer     4x     2.5 µL   y
Bolt reducing agent       10x     1.0 µL   y
""")
loading_buf.num_reactions = 2 * n
loading_buf.extra_percent = 50

protein_samples = MasterMix("""\
Reagent                        Stock      Volume MM?
=========================  =========  ========== ===
water                                 to 10.0 µL   y
loading buffer master mix         2x      5.0 µL   y
BSA                        500 ng/µL      1.0 µL   y
""")
protein_samples.num_reactions = n
protein_samples.extra_percent = 10

dna_samples = MasterMix("""\
Reagent                        Stock      Volume MM?
=========================  =========  ========== ===
loading buffer master mix         2x      5.0 µL   y