Beispiel #1
0
def format_PCR_conditions(primers, polymerase=None):
    conditions = [['C(Na)',   ]+format_concentration(PCR_P.Na).split(),
                  ['C(Mg)',   ]+format_concentration(PCR_P.Mg).split(),
                  ['C(dNTP)', ]+format_concentration(PCR_P.dNTP).split(),
                  ['C(DNA)',  ]+format_concentration(PCR_P.DNA).split(),]
    if primers:
        for primer in primers:
            conditions.append(['C(%s)' % primer.id,]+format_concentration(primer.total_concentration).split())
    conditions.append(['C(DMSO)', '%.1f' % PCR_P.DMSO, '%'])
    if polymerase:
        conditions.append(['C(Poly)', ]+Text.format_quantity(polymerase*1e-6, 'u/ul').split())
    conditions.append(['T', '%.1f' % PCR_P.PCR_T, 'C'])
    return Text.print_table(conditions, delimiter='')
Beispiel #2
0
def format_concentration(concentration):
    return Text.format_quantity(concentration, 'M')