Exemplo n.º 1
0
    def get_reaction(self):
        rxn = stepwise.MasterMix()
        rxn.volume = '20 µL'

        rxn['T4 ligase buffer'].volume = '2.0 μL'
        rxn['T4 ligase buffer'].stock_conc = '10x'
        rxn['T4 ligase buffer'].master_mix = True
        rxn['T4 ligase buffer'].order = 2

        enz_uL = 0.5 if self.num_fragments <= 10 else 1.0

        rxn['T4 DNA ligase'].volume = enz_uL, 'µL'
        rxn['T4 DNA ligase'].stock_conc = '400 U/μL'
        rxn['T4 DNA ligase'].master_mix = True
        rxn['T4 DNA ligase'].order = 3

        enzyme_db = NebRestrictionEnzymeDatabase()

        for enzyme in self.enzymes:
            stock = enzyme_db[enzyme]['concentration'] / 1000
            rxn[enzyme].volume = enz_uL, 'µL'
            rxn[enzyme].stock_conc = stock, 'U/µL'
            rxn[enzyme].master_mix = True
            rxn[enzyme].order = 4

        return self._add_fragments_to_reaction(rxn)
Exemplo n.º 2
0
    def get_reaction(self):
        rxn = stepwise.MasterMix()
        rxn.num_reactions = n = self.num_reactions
        rxn.solvent = None

        rxn['mRNA'].stock_conc = consensus(
            get_conc_uM(self.db, x, self.mrna_stock_uM) for x in self.mrnas)
        rxn['linker'].stock_conc = consensus(
            get_conc_uM(self.db, x, self.linker_stock_uM)
            for x in self.linkers)

        rxn['mRNA'].volume = self.mrna_volume_uL, 'µL'
        rxn['linker'].volume = (
            self.linker_ratio * rxn['mRNA'].volume *
            (rxn['mRNA'].stock_conc / rxn['linker'].stock_conc))

        rxn['mRNA'].master_mix = 'mrna' in self.master_mix
        rxn['linker'].master_mix = 'link' in self.master_mix

        if self.mrnas:
            rxn['mRNA'].name = ','.join(self.mrnas)
        if self.linkers:
            rxn['linker'].name = ','.join(self.linkers)

        rxn['PBS'].volume = rxn.volume / 9
        rxn['PBS'].stock_conc = '10x'
        rxn['PBS'].order = -1

        return rxn
Exemplo n.º 3
0
def elution_buffer():
    return stepwise.MasterMix("""\
            Reagent               Stock      Volume
            ===================  ======  ==========
            nuclease-free water          to 1000 µL
            Tris, pH 7.5            1 M       10 µL
            NaCl                    5 M      100 µL
            EDTA                 500 mM        2 µL
            SDS                     10%       10 µL
    """)
Exemplo n.º 4
0
    def get_reaction(self):
        rxn = stepwise.MasterMix()
        rxn.volume = '20 µL'

        rxn['Gibson master mix'].volume = rxn.volume / 2
        rxn['Gibson master mix'].stock_conc = "2x"
        rxn['Gibson master mix'].catalog_num = 'NEB E2611'
        rxn['Gibson master mix'].master_mix = True
        rxn['Gibson master mix'].order = 2

        return self._add_fragments_to_reaction(rxn)
Exemplo n.º 5
0
    def get_dnazyme_buffer(self):
        rxn = stepwise.MasterMix()
        rxn.volume = 20 * (self.num_reactions + 5), 'µL'
        rxn.extra_min_volume = '1 µL'

        rxn['Tris pH=8.5'].stock_conc = '1000 mM'
        rxn['Tris pH=8.5'].hold_stock_conc.conc = '250 mM'

        rxn['NaCl'].stock_conc = '5000 mM'
        rxn['NaCl'].hold_stock_conc.conc = '500 mM'

        rxn['MgCl₂'].stock_conc = '2000 mM'
        rxn['MgCl₂'].hold_stock_conc.conc = '5 mM'

        if rxn['MgCl₂'].volume < '1 µL':
            rxn.hold_ratios.volume *= '1 µL' / rxn['MgCl₂'].volume

        return rxn
Exemplo n.º 6
0
    def get_reaction(self):
        rxn = stepwise.MasterMix()
        rxn.volume = '100 µL'
        rxn.num_reactions = self.num_reactions

        rxn['water'].name = 'nuclease-free water'

        rxn['DNAzyme buffer'].stock_conc = '5x'
        rxn['DNAzyme buffer'].hold_stock_conc.conc = '1x'
        rxn['DNAzyme buffer'].master_mix = True

        rxn['o213'].stock_conc = '100 µM'
        rxn['o213'].hold_stock_conc.conc = '0.1 µM'
        rxn['o213'].master_mix = True

        rxn['samples'].volume = '10.5 µL'
        rxn['samples'].master_mix = False

        while rxn['o213'].volume * rxn.scale < '0.5 µL':
            rxn['o213'].hold_conc.stock_conc /= 2

        return rxn
Exemplo n.º 7
0
    def get_reaction(self):
        rxn = stepwise.MasterMix("""\
                Reagent                            Stock    Volume  MM?
                =============================  =========  ========  ===
                water                                     to 50 µL   +
                S30 extract [2]                              12 µL   +
                synthesis buffer [2]                  2x     25 µL   +
                T7 RNA polymerase               450 U/µL      1 µL   +
                RNase inhibitor (murine)         40 U/µL      1 µL   +
                GamS nuclease inhibitor [2,3]  1.5 µg/µL      1 µL   +
        """)
        rxn.hold_ratios.volume = self.volume_uL, 'µL'
        rxn.num_reactions = self.num_reactions or len(self.templates)

        rxn['template'].name = f"{','.join(self.templates)} [3]"
        rxn['template'].stock_conc = self.template_stock_nM, 'nM'
        rxn['template'].hold_stock_conc.conc = self.template_conc_nM, 'nM'

        rxn.hold_ratios.volume = self.volume_uL, 'µL'

        if self.use_mrna:
            del rxn['T7 RNA polymerase']

        return rxn
Exemplo n.º 8
0
#!/usr/bin/env python3

import docopt
import stepwise
import wang2017

controls = stepwise.MasterMix("""\
Reagent                            Stock      Volume  MM?
===============================  =======  ==========  ===
nuclease-free water                       to 10.5 µL   x
o210,o211,o212                      5 µM      0.5 µL
""")

purex = stepwise.MasterMix("""\
Reagent                            Stock      Volume  MM?
===============================  =======  ==========  ===
nuclease-free water                       to 10.5 µL   x
A                                             4.0 µL   x
B                                             3.0 µL   x
RNase inhibitor (murine)         40 U/µL      0.2 µL   x
o210,o211,o212                      5 µM      0.5 µL
""")

pfrex = stepwise.MasterMix("""\
Reagent                            Stock      Volume  MM?
===============================  =======  ==========  ===
nuclease-free water                       to 10.5 µL   x
Solution I                                    5.0 µL   x
Solution II                                   0.5 µL   x
Solution III                                  1.0 µL   x
o210,o211,o212                      5 µM      0.5 µL
Exemplo n.º 9
0
    def get_reactions(self):

        # Define the annealing reaction:

        anneal = stepwise.MasterMix()
        anneal.num_reactions = self.num_reactions
        anneal.solvent = None
        anneal.extra_min_volume = 0.5, 'µL'

        template_fmol = self.volume_uL * self.template_conc_nM

        anneal['template'].name = ','.join(self.templates)
        anneal['template'].stock_conc = self.template_stock_nM, 'nM'
        anneal[
            'template'].volume = template_fmol / self.template_stock_nM, 'µL'
        anneal['template'].master_mix = 'rna' in self.master_mix
        anneal['template'].order = 2

        anneal['primer'].name = ','.join(self.primers)
        anneal['primer'].stock_conc = self.primer_stock_uM, 'µM'
        anneal[
            'primer'].volume = self.primer_excess * template_fmol / self.primer_stock_uM / 1e3, 'µL'
        anneal['primer'].master_mix = 'primer' in self.master_mix
        anneal['primer'].order = 3

        # If necessary, dilute the annealing reaction such that it will be
        # necessary to add the given volume to the RT reaction.  The purpose of
        # this is to ensure that we can pipet this volume accurately, since we
        # often want to be quantitative about how much RNA we have (e.g. qPCR).

        if anneal.volume < (self.rna_min_volume_uL, 'µL'):
            anneal.solvent = 'nuclease-free water'
            anneal.volume = self.rna_min_volume_uL, 'µL'

        anneal['first-strand buffer'].stock_conc = '5x'
        anneal['first-strand buffer'].volume = 0, 'µL'
        anneal['first-strand buffer'].volume = anneal.volume / 4
        anneal['first-strand buffer'].master_mix = bool(self.master_mix)
        anneal['first-strand buffer'].order = 1

        # Define the MMLV reaction:

        mmlv = stepwise.MasterMix("""\
                Reagent                      Stock      Volume  MM?
                ========================  ========  ==========  ===
                nuclease-free water                 to 20.0 µL  yes
                first-strand buffer             5x      4.0 µL  yes
                dNTP mix                     10 mM      2.0 µL  yes
                DTT                         100 mM      2.0 µL  yes
                SMART MMLV RT             200 U/µL      0.5 µL  yes
                annealed template/primer                0.0 µL
        """)
        mmlv.num_reactions = self.num_reactions
        mmlv.hold_ratios.volume = self.volume_uL, 'µL'
        mmlv['first-strand buffer'].volume -= anneal[
            'first-strand buffer'].volume
        mmlv['annealed template/primer'].volume = anneal.volume
        mmlv['annealed template/primer'].stock_conc = \
                anneal['template'].stock_conc * (
                        anneal['template'].volume / anneal.volume)

        # Scale the volume of the annealing reaction to guarantee that none of
        # the volume are too small to pipet accurately.

        min_pipet_volumes = {
            'template': (self.rna_min_volume_uL, 'µL'),
        }
        pipet_volumes = [
            (anneal.master_mix_volume, '0.5 µL'),
        ]
        pipet_volumes += [
            (anneal[k].volume, min_pipet_volumes.get(k, '0.5 µL'))
            for k in ['template', 'primer'] if not anneal[k].master_mix
        ]
        anneal.hold_ratios.volume *= max(
            1 + self.extra_anneal_percent / 100,
            *(limit / curr for curr, limit in pipet_volumes),
        )

        return anneal, mmlv
Exemplo n.º 10
0
#!/usr/bin/env python3

import stepwise

p = stepwise.Protocol()
rxn = stepwise.MasterMix("""\
        Reagent   Stock  Volume  MM?
        =======  ======  ======  ===
        o126     400 µM    1 µL  yes
        o127     400 µM    1 µL  yes
        PBS          2x    2 µL  yes
""")
rxn.num_reactions = 4

p += f"""\
Setup 4 click reactions:

{rxn}
"""

p += """\
Incubate the reactions as follows:

- 25°C for 4h
- 25°C for 3h30, 65°C for 30 min
- 37°C for 4h
- 37°C for 3h30, 65°C for 30 min
"""

p += stepwise.load("gel anneal 6 -c 1990")
Exemplo n.º 11
0
#!/usr/bin/env python3

import stepwise
from stepwise import pl, ul

p = stepwise.Protocol()

p += stepwise.load('cond optimize_click_freeze_cond.xlsx')

rxn = stepwise.MasterMix("""\
        Reagent   Stock  Volume  MM?
        =======  ======  ======  ===
        PBS          2x    2 µL   -
        o126     400 µM    1 µL   +
        o233     400 µM    1 µL   +
""")
rxn.num_reactions = 2
rxn.extra_percent = 0
rxn.hold_ratios.volume = '3 µL'

p += pl(
    f"Setup {rxn.num_reactions} click reactions:",
    rxn,
)
p += "Divide each reaction in three."

p += pl(
    "Incubate the reactions as follows:",
    ul(
        "−20°C overnight",
        "25°C for 4h, −20°C overnight",
Exemplo n.º 12
0
        later step).
"""

import docopt
import stepwise

args = docopt.docopt(__doc__)

# PBS:
# - I don't remember why I decided to add PBS to this reaction.
# - The Glen Research protocol referenced by expt #57 doesn't call for any 
#   salt.
rxn = stepwise.MasterMix("""\
  Reagent                  Stock  Volume
  ======================  ======  ======
  puromycin oligo         400 µM    1 µL
  annealing oligo         400 µM    1 µL
  PBS                         2x    2 µL
""")

rxn['puromycin oligo'].name = args['<puro-oligo>']
rxn['annealing oligo'].name = args['<anneal-oligo>']

if v := args['--volume']:
    rxn.hold_ratios.volume = v, 'µL'

p = stepwise.Protocol()

p += stepwise.Step(
        "Couple the linker oligos:",
        rxn,
Exemplo n.º 13
0
        complete description of the syntax.  This optiona can be specified 
        multiple times.
"""

import docopt
import stepwise
from inform import plural

args = docopt.docopt(__doc__)
protocol = stepwise.Protocol()
purexpress = stepwise.MasterMix('''\
Reagent                  Stock      Volume  MM?
===================  =========  ==========  ===
water                           to 10.0 µL  yes
A                                   4.0 µL  yes
B                                   3.0 µL  yes
RNase inhibitor [1]    40 U/µL      0.2 µL  yes
ZnOAc                     1 mM      0.5 µL  yes
target DNA              750 nM      0.8 µL  yes
template DNA             75 nM      0.8 µL
template mRNA          1000 nM      1.6 µL
''')

if not args['--add-zinc']:
    del purexpress['ZnOAc']

if not args['--add-target']:
    del purexpress['target DNA']

if args['--no-inhibitor']:
    del purexpress['RNase inhibitor [1]']
else:
Exemplo n.º 14
0
    def get_protocol(self):
        p = stepwise.Protocol()

        if self.dnase_treatment == 'pre':
            mm = stepwise.MasterMix("""\
                    Reagent                   Stock    Volume  MM?
                    ======================  =======  ========  ===
                    nuclease-free water              to 50 µL   +
                    DNA digestion buffer        10x      5 µL   +
                    DNase I [1]              1 U/µL      5 µL   +
                    RNA sample               <10 µg     40 µL   -
            """)

            step = "Setup a DNase I reaction for each sample:"
            if self.num_samples:
                step = f"Setup {plural(self.num_samples):# DNase I reaction/s}:"
                mm.num_reactions = self.num_samples

            if self.sample_volume_uL:
                mm['RNA sample'].volume = self.sample_volume_uL, 'µL'

            p += pl(step, mm)
            p += "Incubate at room temperature for 15 min."

            p.footnotes[
                1] = "Reconstitute lyophilized DNase I (#E1009-A; 250U) with 275 µL nuclease-free water and mix by gentle inversion.  Store frozen aliquots."

        if self.dnase_treatment == 'post':
            mm = stepwise.MasterMix("""\
                    Reagent                   Stock    Volume  MM?
                    ======================  =======  ========  ===
                    DNA digestion buffer        10x     75 µL   +
                    DNase I [1]              1 U/µL      5 µL   +
            """)
            if self.num_samples:
                mm.num_reactions = self.num_samples

            p += pl("Prepare 80 µL DNase I reaction mix for each sample:", mm)

        s = ul()
        p += pl("Purify RNA using Zymo Clean & Concentrator spin columns:", s)

        if self.sample_volume_uL:
            if self.sample_volume_uL < 50:
                s += f"Add {50 - self.sample_volume_uL:g} nuclease-free water to each sample"

            v = max(50, self.sample_volume_uL)
            s += f"Add {2*v:g} µL RNA binding buffer; mix."
            s += f"Add {3*v:g} µL >95% ethanol; mix."

        else:
            s += "If necessary, bring each sample to 50 µL."
            s += "Add 2 volumes RNA binding buffer; mix."
            s += "Add 3 volumes >95% ethanol; mix."

        s += f"Load sample on spin column."
        s += f"Spin 1 min, 16000g; discard flow-through."

        if self.dnase_treatment == 'post':
            s += f"Add 400 µL RNA wash buffer."
            s += f"Spin 30s, 16000g; discard flow-through."
            s += f"Add 80 µL DNase I reaction mix."
            s += f"Incubate at room temperature for 15 min."

        s += f"Add 400 µL RNA prep buffer."
        s += f"Spin 30s, 16000g; discard flow-through."
        s += f"Add 700 µL RNA wash buffer."
        s += f"Spin 30s, 16000g; discard flow-through."
        s += f"Add 400 µL RNA wash buffer."
        s += f"Spin 60s, 16000g; discard flow-through."
        s += f"Add {self.elute_volume_uL:g} µL nuclease-free water."
        s += f"Spin 30s, 16000g."

        return p
Exemplo n.º 15
0
    def get_reaction_neb(self):
        # Enzyme volume:
        # - One unit is defined as the amount of enzyme required to convert 1 
        #   nanomole of 5´-[32P]rA16 into a phosphatase-resistant form in 30 
        #   minutes at 37°C.
        #
        #   - Compared to the unit definition for the Takara enzyme, this 
        #     definition has:
        #
        #     - 1000x more RNA
        #     - 3x longer reaction time
        #     - 28°C warner reaction temperature
        #
        #   - The NEB enzyme is also 10 U/µL, which the Takara one is 40 U/µL.
        #
        # - [Reyes2021] used:
        #   - 20 U T4 RNA ligase
        #   - 3 U T4 PNK
        #   - 400 pmol mRNA (100 µL at 4 µM)
        #
        #   Scaled to 5 pmol RNA (40 µL at 125 nM):
        #   - 0.25 U (0.025 µL) T4 RNA ligase
        #   - 0.0375 U (0.00375 µL) T4 PNK
        #
        # - The NEB ligation protocol calls for:
        #   - 10 U T4 RNA ligase
        #   - 20 pmol RNA
        #   - 2h incubation at 25°C
        #   - https://www.neb.com/protocols/2018/10/17/protocol-ligation-of-an-oligo-to-the-3-end-of-rna-using-t4-rna-ligase-1m0204
        #
        #   Scaled to 5 pmol RNA (40 µL at 125 nM):
        #   - 2.5 U T4 RNA ligase (0.25 µL)
        #
        # - I'm going to follow [Reyes2021]:
        #
        #   - [Reyes2021] uses annealed oligos, like my reaction.  The other 
        #     reactions/definitions are based on unannealed RNAs.  It's very 
        #     likely that the ligation reaction would be much faster with 
        #     annealed oligos, meaning that less enzyme would be needed.
        #
        #   - The reactions I'm doing are big enough that if I don't follow 
        #     [Reyes2021], I'd need to use ≈10 µL volumes of enzyme, which 
        #     would get very expensive.  Maybe I'll need to optimize this, but 
        #     for now it just feels more practical to use the smaller volumes 
        #     called for by [Reyes2021].
        #
        #   - I used the T4 PNK concentration from [Reyes2021], even though I 
        #     normally don't use PNK.  As with the ligase, this PNK 
        #     concentration is also much lower than what I'd been using in the 
        #     Takara reaction.
        #
        # - Update: 2021/05/06
        #   
        #   - I decided to double the enzyme volumes relative to [Reyes2021]_, 
        #     because I suspect that I wasn't getting as much ligation with 
        #     those volumes as I used to.  I haven't rigorously tried to 
        #     optimize this, yet.

        rxn = stepwise.MasterMix("""\
                Reagent                  Stock       Volume  MM?
                =====================  =======  ===========  ===
                nuclease-free water             to 40.00 µL   +
                T4 RNA ligase buffer       10x       4.0 µL   +
                ATP                      10 mM       4.0 µL   +
                PEG 8000                   50%      20.0 µL   +
                T4 PNK                 10 U/µL     0.008 µL   -
                T4 RNA ligase          10 U/µL     0.050 µL   -
                annealed mRNA/linker   1.25 µM       4.0 µL   -
        """)
        rxn['T4 RNA ligase'].name = "T4 RNA ligase (NEB M0204)"
        return self._adjust_reaction(rxn)
Exemplo n.º 16
0
args = docopt.docopt(__doc__)
rxn_uL = float(args['--volume'])
mg_mM = float(args['--mg-conc'])
mg_stock_mM = float(args['--mg-stock'])
k_mM = float(args['--k-conc'])
k_stock_mM = float(args['--k-stock'])

M = np.array([
    [mg_mM, -mg_stock_mM,           0,      0],
    [ k_mM,            0, -k_stock_mM,      0],
    [    1,           -1,          -1, rxn_uL],
])
salt_uL = np.linalg.solve(M[:,:3], M[:,3])

rxn = stepwise.MasterMix()
rxn.num_reactions = int(args['--num-reactions'])
rxn.extra_min_volume = 5, 'µL'
rxn.solvent = None
rxn['translation reaction'].volume = rxn_uL, 'µL'
rxn['translation reaction'].name = args['<reagent>']
rxn['translation reaction'].stock_conc = args['--ivtt-stock']
rxn['MgOAc'].stock_conc = mg_stock_mM, 'mM'
rxn['MgOAc'].volume = salt_uL[1], 'µL'
rxn['MgOAc'].master_mix = True
rxn['KCl'].stock_conc = k_stock_mM, 'mM'
rxn['KCl'].volume = salt_uL[2], 'µL'
rxn['KCl'].master_mix = True

p = stepwise.Protocol()
p += pl(
Exemplo n.º 17
0
            primer_scale = pcr.scale if pcr[p].master_mix else 1
            primer_vol = primer_scale * pcr[p].volume

            if primer_vol < '0.5 µL':
                use_primer_mix.append(p)

        if use_primer_mix:
            pcr['primer mix'].order = 4
            pcr['primer mix'].stock_conc = '10x'
            pcr['primer mix'].volume = pcr.volume / 10
            pcr['primer mix'].master_mix = all(
                    pcr[p].master_mix
                    for p in use_primer_mix
            )

            primer_mix = stepwise.MasterMix()
            primer_mix.volume = pcr.volume

            for p in use_primer_mix:
                primer_mix[p].name = pcr[p].name
                primer_mix[p].stock_conc = pcr[p].stock_conc
                primer_mix[p].volume = pcr[p].volume
                primer_mix[p].hold_stock_conc.conc *= 10
                del pcr[p]

            primer_mix.hold_ratios.volume = '10 µL'

        return pcr, primer_mix

    def get_templates(self):
        return [x.template for x in self.amplicons]