thtools.crt.CelsiusRangeResult

class thtools.crt.CelsiusRangeResult(results, celsius_range, meta)

Data container for a CelsiusRangeTest.

Not intended to be constructed manually.

Note

All activation and unbinding values are given as decimals, not percentages.

See also

CelsiusRangeTest

Examples

>>> import thtools as tt
>>> ths = "UUAGCCGCUGUCACACGCACAGGGAUUUACAAAAAGAGGAGAGUAAAAUGCUGUGCGUGCACCAUAAAACGAACAUAGAC"
>>> rbs = "AGAGGAGA"
>>> fasta = tt.FParser.fromspecies("Homo sapiens")[295:305]
>>> triggers = fasta.seqs
>>> temperatures = range(20, 101, 10)
>>> my_test = tt.autoconfig(ths, rbs, triggers)
>>> my_crt = tt.CelsiusRangeTest(my_test, temperatures)
>>> my_result = my_crt.run(max_size=3, n_samples=200)
>>> my_result.plot().show()

(Source code, png, hires.png, pdf)

../../_images/thtools-crt-CelsiusRangeResult-1.png
Attributes
resultsSequence[ToeholdResult]

The ToeholdResult objects from each temperature.

celsius_rangeSequence[float]

The temperature range tested.

targetsSequence[str]

The highest activating item from the trigger_sets of each ToeholdResult.

target_namesSequence[str], optional

The names of each item in targets.

activationSequence[float]

A list of the switch activation value when bound to the target RNA as the temperature changes.

rbs_unbindingSequence[float]

A list of the RBS unbinding value when bound to the target RNA as the temperature changes.

aug_unbindingSequence[float]

A list of the AUG unbinding value when bound to the target RNA as the temperature changes.

post_aug_unbindingSequence[float]

A list of the post-AUG unbinding value when bound to the target RNA as the temperature changes.

activation_seSequence[float]

A list of the switch activation’s standard error when bound to the target RNA as the temperature changes.

specificitySequence[float]

A list of the switch specificity to the target RNA as the temperature changes.

specificity_seSequence[float]

The standard error of the specificity.

unix_createddatetime.datetime

The UNIX timestamp of the CelsiusRangeResult.

datestr
metadict
pretty_metastr
copy()

Copy an instance of CelsiusRangeResult.

property inferred_target

The target sequence inferred from the mode of the individual ToeholdTest highest activators.

property inferred_target_name

The name of the inferred_target.

plot(y='activation', z_score=1.96, swap=False)

Plot temperature against activation, with color being the specificity.

The following axes are plotted:

Axis

Value

x

temperature /°C

y

toehold switch activation % (or whatever y value you chose)

color

specificity %

Parameters
ystr, default = “activation”

The attribute of the test to plot. The options are: - activation - RBS unbinding - AUG unbinding - post-AUG unbinding

z_scorefloat, default = 1.96

The Z score to multiply SE with when drawing error bars. The default represents a 95% confidence interval.

swapbool, optional

Whether or not to swap the specificity and activation in the plot. Defaults to False.

prettify(dp=None)

Alias to str(self). Get the result as its prettytable.PrettyTable in string form, with added metadata.

Parameters
dpint, optional

The decimal places to use.

savefig(fname, y='activation', z_score=1.96, swap=False, dpi=1200, **kwargs)

Convenience function saving the figure from plot().

See plot(). All kwargs are passed to matplotlib.pyplot.savefig().`

tabulate(dp=None)

Create a prettytable.PrettyTable of the result.

Parameters
dpint, optional

The decimal places to use.

to_csv(dp=None, **kwargs)

Get the result as a CSV with added metadata.

Parameters
dpint, optional

The decimal places to use.

**kwargs

Extra arguments to be passed to csv.writer() via prettytable.PrettyTable.

to_df(dp=None, **kwargs)

Get the result as a pandas DataFrame.

Parameters
dpint, optional

The decimal places to limit the display to.

**kwargs

Extra arguments to be passed to the pandas.DataFrame instance.

to_html(dp=None, **kwargs)

Get the result as a HTML table.

Parameters
dpint, optional

The decimal places to use.

**kwargs

Extra arguments to be passed to PrettyTable.

to_json(dp=None, **kwargs)

Get the result as a JSON string.

Parameters
dpint, optional

The decimal places to use.

**kwargs

Extra arguments to be passed to PrettyTable.