API reference
- class overhang.Overhang(seq)
Class for an overhang and its reverse complement.
Note that the overhang with the lower order (e.g., AATA < TATT) will be stored in Overhang.overhang and the reverse complement in Overhang.overhang_rc, regardless of which was given as parameter.
- Parameters:
seq (str) – ACGT sequence.
- count_max_repeat(repeat=3)
Check overhang for repeating letters.
- Parameters:
repeat (int) – Number of minimum repeats to flag. For example, 3 checks for AAA etc.
- find_codons()
Check overhang for presence of start and stop codons.
This is important information on the suitability of an overhang.
- is_good()
Summarise attributes and decide whether overhang can be used for assembly.
- class overhang.generate_all_overhangs(overhang_length=4)
Generate list of Overhang class instances for all overhangs of given length.
- Parameters:
overhang_length (int) – Length of overhangs.
- class overhang.OverhangSet(overhangs, enzyme='Esp3I', name='Unnamed set')
Class for overhang sets.
An overhang set is a collection of (mutually compatible) overhangs used for DNA assembly.
- Parameters:
overhangs (list of str) – A list of overhang strings. Example: [“TAGG”, “ATGG”, “GACT”].
enzyme (str) – Enzyme used for assembly. Example: “Esp3I”.
name (str) – Name of the set.
- evaluate_annealing()
Evaluate weak anneals, self-misanneals and misanneals between overhangs.
Used in inspect_overhangs().
- find_perfect_subset()
Find a better overhang set by removing bad overhang interactions.
Bad interactions are weak anneals, self-misanneals and misanneals.
- find_similar_overhangs(difference_threshold=None)
Find overhangs that differ in fewer nucleotides than the threshold.
- Parameters:
difference_threshold (int) – Acceptable number of matching nucleotides in an overhang pair. Overhang pairs with fewer differences are marked as similar. Defaults to 0.
- inspect_overhangs(make_plot=True)
Inspect compatibility of overhangs and detect potential errors in the set.
- class overhang.order_overhangs(seq)
Create an overhang’s reverse complement, and return them in order.
Overhangs are ordered by the letters, e.g., AATA < TATT.
- Parameters:
seq (str) – ACGT sequence.
- class overhang.generate_overhang_pairs(overhang_length=4)
Generate all overhang pairs of given length.
- Parameters:
overhang_length (int) – Length of overhangs.
- class overhang.subset_data_for_overhang(dataframe, overhang, horizontal=True, filter=True)
Subset Tatapov dataframe for given overhang.
- Parameters:
dataframe (DataFrame) – Tatapov dataset, for example tatapov.annealing_data[“25C”][“01h”].
overhang (Overhang) – Overhang class instance.
horizontal (bool) – Orientation of returned dataframe.
filter (bool) – If True, keep only columns (if horizontal=True) or rows (if horizontal=False) with nonzero values.
- class overhang.plot_data(df, ax=None, colorbar=True, figwidth=8, plot_color='Reds')
Plot a (restricted) Tatapov dataframe.
- Parameters:
df (DataFrame) – One of the data sheets provided by tatapov, e.g. annealing_data[“37C”][“01h”]. Or a restriction using data_subset.
ax (matplotlib.axes.Axes, optional) – A Matplotlib ax. If none is provided, one will be created and returned at the end.
colorbar (bool) – If True, the figure will have a colorbar.
figwidth (float, optional) – Custom width of the figure.
plot_color (str) – A Matplotlib colormap name.
- class overhang.filter_overhangs(overhangs, enzyme='Esp3I')
Filter overhangs using the Tatapov package.
Filter out the weakly annealing and self-misannealing overhangs.
- Parameters:
overhangs (list of Overhang) – List of Overhang instances.
enzyme (str) – Enzyme used with the overhangs. See overhang.tools.enzyme_tatapov_lookup for options.
- class overhang.write_pdf_report(target, overhangs, enzyme='Esp3I')
Write an overhang compendium.
- Parameters:
target (str) – Path for PDF file.
overhangs (list of Overhang) – List of Overhang instances.
enzyme (str) – Enzyme used for assembly. Options: “BsaI”, “BsmBI”, “Esp3I”, or “BbsI”.
- class overhang.write_overhangset_report(target, overhangset)
Write a report on an overhang set.
- Parameters:
target (str) – Path for PDF file.
overhangset (OverhangSet) – An OverhangSet instance.