thtools.core.ToeholdResult¶
- class thtools.core.ToeholdResult¶
Data container for the result of a
ToeholdTest
.Not intended to be constructed manually.
Note
All activation and unbinding values are given as decimals, not percentages.
See also
ToeholdTest
A class to test different trigger sets against the toehold switch for activation probability, in order to find its specificity.
- Attributes
- trigger_setsCollection[Collection[str]]
The trigger sets that were tested.
- namesCollection[str | Collection[str]]
The names of each trigger set in
trigger_sets
. If a collection of names is given for each trigger set, they will be joined with ‘+’ signs. This can also be set through the names parameter ofToeholdTest
or passed to an argument to one of the methods defined here.- activationnp.ndarray[np.float64]
An array of the activation by each trigger set.
- rbs_unbindingnp.ndarray[np.float64]
An array of the RBS unbinding by each trigger set.
- aug_unbindingnp.ndarray[np.float64]
An array of the AUG unbinding by each trigger set.
- post_aug_unbindingnp.ndarray[np.float64]
An array of the post-AUG unbinding by each trigger set.
- activation_senp.ndarray[np.float64]
The standard error of each value in the
activation
attribute array.- specificitynp.ndarray[np.float64]
The level of specificity to the highest activating trigger set.
- specificity_senp.ndarray[np.float64]
The standard error of the
specificity
attribute.- target_indexint
The index of the trigger_sets with the highest activation probability.
- target_setCollection[str]
The item in the trigger_sets with the highest activation probability.
- targetstr | Collection[str]
Same as target_set, but if the trigger_set only contains a single RNA, this is the RNA sequence.
- target_namestr
The name of the trigger_set with the highest activation probability.
- target_activationfloat
The switch activation probability with the target trigger set.
- target_activation_sefloat
The standard error of the switch activation probability with the target trigger set.
- unix_createddatetime.datetime
UNIX timestamp of the creation of the
ToeholdResult
.- datestr
- metadict
- pretty_metastr
- prettify(dp, names, show_unbinding)¶
Alias to str(self). Get the result as its
prettytable.PrettyTable
in string form, with added metadata.- Parameters
- dpint, optional
The decimal places to limit the display to.
- namesCollection[str | Collection[str]], optional
The names of each trigger set in
trigger_sets
.- show_unbindingbool, default = True
Whether to display the individual unbinding probability of the RBS, start codon and post-start codon region
- tabulate(dp, names, show_unbinding)¶
Create a
prettytable.PrettyTable
of the result.- Parameters
- dpint, optional
The decimal places to limit the display to.
- namesCollection[str | Collection[str]], optional
The names of each trigger set in
trigger_sets
.- show_unbindingbool, default = True
Whether to display the individual unbinding probability of the RBS, start codon and post-start codon region
- to_csv(dp, names, show_unbinding, **kwargs)¶
Get the result as a CSV with added metadata.
- Parameters
- dpint, optional
The decimal places to limit the display to.
- namesCollection[str | Collection[str]], optional
The names of each trigger set in
trigger_sets
.- show_unbindingbool, default = True
Whether to display the individual unbinding probability of the RBS, start codon and post-start codon region
- **kwargs
Extra arguments to be passed to
csv.writer()
via thePrettyTable.prettytable
instance.
- to_df(dp, names, show_unbinding, **kwargs)¶
Get the result as a pandas DataFrame.
- Parameters
- dpint, optional
The decimal places to limit the display to.
- namesCollection[str | Collection[str]], optional
The names of each trigger set in
trigger_sets
.- show_unbindingbool, default = True
Whether to display the individual unbinding probability of the RBS, start codon and post-start codon region
- **kwargs
Extra arguments to be passed to the
pandas.DataFrame
instance.
- to_html(dp, names, show_unbinding, **kwargs)¶
Get the result as a HTML table.
- Parameters
- dpint, optional
The decimal places to limit the display to.
- namesCollection[str | Collection[str]], optional
The names of each trigger set in
trigger_sets
.- show_unbindingbool, default = True
Whether to display the individual unbinding probability of the RBS, start codon and post-start codon region
- **kwargs
Extra arguments to be passed to the
PrettyTable.prettytable
instance.
- to_json(dp, names, show_unbinding, **kwargs)¶
Get the result as a JSON string.
- Parameters
- dpint, optional
The decimal places to limit the display to.
- namesCollection[str | Collection[str]], optional
The names of each trigger set in
trigger_sets
.- show_unbindingbool, default = True
Whether to display the individual unbinding probability of the RBS, start codon and post-start codon region
- **kwargs
Extra arguments to be passed to the
PrettyTable.prettytable
instance.