def test_gene_expression(self): # Set up the standard TXTL tubes tube1 = txtl.extract('BL21_DE3') tube2 = txtl.buffer('stdbuffer') # Now set up a tube that will contain our DNA tube3 = txtl.newtube('geneexpr') # Define a DNA strand using strings (ala MATLAB) gene1 = txtl.assemble_dna('ptet(50)', 'BCD2(20)', 'tetR(1200)') txtl.add_dna(tube3, gene1, 1, 'plasmid') # Create individual DNA components based on standard types ptet = txtl.RepressedPromoter('ptet', 'tetR', dimer=True) bcd2 = txtl.ConstitutiveRBS('BCD2', Ribosome_Binding_F=10) degfp = txtl.ProteinCDS('deGFP', maturation_time=30 * txtl.minutes) lva = txtl.DegradationTag('lva', 'clpXP') # Assemble a gene using objects instead of strings gene2 = txtl.assemble_dna(ptet, bcd2, degfp, lva) txtl.add_dna(tube3, gene2, 1, 'plasmid') # Mix the contents of the individual tubes well1 = txtl.combine_tubes([tube1, tube2, tube3]) # Create an SBML file containing the model txtl.write_sbml(well1, 'geneexpr.xml')
def test_assemble_objects(self): mix = txtl.Mixture('testmix') ptet = txtl.RepressedPromoter('ptet', 'tetR', dimer=True) bcd2 = txtl.ConstitutiveRBS('BCD2', Ribosome_Binding_F=10) degfp = txtl.ProteinCDS('deGFP', maturation_time=30 * txtl.minutes) lva = txtl.DegradationTag('lva', 'clpXP') gene = txtl.assemble_dna(ptet, bcd2, degfp, lva) txtl.add_dna(mix, gene, 1, 'plasmid')
def test_override_parameters(self): bcd2 = txtl.ConstitutiveRBS('BCD2', parameters = {Ribosome_Binding_F:10})
def test_override_parameter_keyword(self): # Override a single parameter bcd2 = txtl.ConstitutiveRBS('BCD2', Ribosome_Binding_F=10) degfp = txtl.ProteinCDS('deGFP', maturation_time=30*txtl.minutes)
tube3 = txtl.newtube('geneexpr') # Define a DNA strand using strings (ala MATLAB) gene1 = txtl.assemble_dna(prom='ptet(50)', utr5='BCD2(20)', cds='tetR(1200)') txtl.add_dna(mixture=tube3, dna=gene1, conc=1, type='plasmid') # # Assemble a DNA strand using objects (semi-pythonic) # # Note: these constructs would normally live inside of a model # library, but this shows how to extend functionality by creating # constructs inline. # Create individual DNA components based on standard types ptet = txtl.RepressedPromoter('ptet', 'tetR', dimer=True) bcd2 = txtl.ConstitutiveRBS('BCD2', Ribosome_Binding_F=10) degfp = txtl.ProteinCDS('deGFP', maturation_time=30 * txtl.minutes) lva = txtl.DegradationTag('lva', 'clpXP') # Assemble a gene using objects instead of strings gene2 = txtl.assemble_dna(ptet, bcd2, degfp, lva) txtl.add_dna(tube3, gene2, 1, 'plasmid') # Mix the contents of the individual tubes well1 = txtl.combine_tubes([tube1, tube2, tube3]) # Run a simulation #! TODO: implement simdata = txtl.bioscrape.runsim(well1, 8 * txtl.hours) # plot the result