Test tube analysis example

Analyze a test tube containing 2 strand species that interact to form all complex species of up to 4 strands.

Strand a: 5e-6 M
Strand b: 5e-6 M

Strands a and b are intended to form a bipedal walker complex '(a+b)' with a duplex torso and single-stranded legs (Shin and Pierce, J Am Chem Soc, 2004).

Material: DNA
Temperature: 23 C

Calculate the partition function, equilibrium pair probability matrix, MFE proxy structure(s), and equilibrium concentration for each complex species in the tube, as well as the ensemble pair fractions for the tube ensemble.

In [1]:
# Import NUPACK Python module
from nupack import *
In [2]:
# Define physical model
my_model = Model(material='dna', celsius=23)

# Define strand species

# Define tube ensemble containing strands at specified concentrations 
# interacting to form all complexes up to 4 strands
t1 = Tube(strands={a:5e-6, b:5e-6}, complexes=SetSpec(max_size=4), name='Tube t1')

# Analyze the tube ensemble
# Calculate pfunc (default), pairs, mfe, concentration (default) for each complex 
# Since pairs is specified, calculate ensemble pair fractions for the tube ensemble
tube_result = tube_analysis(tubes=[t1], compute=['pairs', 'mfe'], model=my_model)
Complex results:
Complex Pfunc ΔG (kcal/mol) MFE (kcal/mol)
(a) 4.8748e+4 -6.353 -5.141
(b) 8.7537e+6 -9.407 -8.529
(a+a) 9.7092e+16 -23.019 -22.044
(a+b) 4.1688e+30 -41.492 -38.547
(b+b) 2.0381e+18 -24.810 -22.722
(a+a+a) 2.5957e+27 -37.148 -34.926
(a+a+b) 1.2658e+43 -58.407 -56.167
(a+b+b) 8.4192e+42 -58.167 -53.124
(b+b+b) 1.9407e+30 -41.042 -36.918
(a+a+a+a) 5.9410e+39 -53.896 -51.829
(a+a+a+b) 3.9996e+53 -72.635 -69.048
(a+a+b+b) 4.4989e+63 -86.255 -79.755
(a+b+a+b) 4.1249e+68 -92.979 -90.290
(a+b+b+b) 1.4056e+55 -74.729 -68.553
(b+b+b+b) 2.9430e+42 -57.548 -52.288
Concentration results:
Complex Tube t1 (M)
(a+b) 1.901e-06
(a+b+a+b) 1.549e-06
(a+a+b+b) 1.690e-11
(b) 5.793e-12
(a+a+b) 3.978e-12
(a) 1.860e-12
(a+b+b) 4.589e-14
(a+a) 2.553e-18
(a+a+a+b) 8.663e-20
(b+b) 1.612e-20
(a+b+b+b) 9.155e-22
(a+a+a) 4.705e-26
(b+b+b) 1.834e-28
(a+a+a+a) 7.421e-32
(b+b+b+b) 3.324e-36
In [3]:
# MFE proxy structure for bipedal walker complex '(a+b)'
walker_result = tube_result['(a+b)']
print('\nMFE proxy structure(s) for walker (a+b):')
for i, s in enumerate(walker_result.mfe):
    print('    %2d: %s (%.2f kcal/mol)' % (i, s.structure, s.energy))
MFE proxy structure(s) for walker (a+b):
     0: ((((((((((((((((((((((.((.....)))).........+..........(.(....).)...)))))))))))))))))))) (-38.55 kcal/mol)
In [4]:
# Plot the equilibrium pair probability matrix for bipedal walker complex '(a+b)'
import matplotlib.pyplot as plt
plt.xlabel('Base index')
plt.ylabel('Base index')
plt.title('Pair probabilities for complex (a+b)')
plt.clim(0, 1)
In [5]:
# Plot the ensemble pair fractions for the tube 
plt.xlabel('Base index')
plt.ylabel('Base index')
plt.title('Ensemble pair fractions for ' + ', '.join(s.name for s in t1.strands))
plt.clim(0, 1)