itpseq.Sample.itp_len_plot#
- Sample.itp_len_plot(ax=None, min_codon=0, max_codon=10, limit=100, norm=False)[source]#
Generates a line plot of inverse-toeprint (ITP) counts per length.
This method uses the output of itp_len to create a line plot showing the counts of inverse-toeprints across lengths for each replicate. Optionally, counts can be normalized (per million reads), and the plotted lengths can be limited.
- Parameters:
ax (matplotlib.axes.Axes, optional) – Pre-existing axes to draw the plot on. A new figure and axes are created if not provided.
min_codon (int, optional) – The minimum codon position to annotate on the plot. Defaults to 0.
max_codon (int, optional) – The maximum codon position to annotate on the plot. Defaults to 10.
limit (int, optional) – The maximum length to include in the plot. Defaults to 100.
norm (bool, optional) – Whether to normalize counts to reads per million. Defaults to False.
- Returns:
The axes object containing the plotted lineplot.
- Return type:
matplotlib.axes.Axes
Notes
The x-axis represents the distance from the 3’ end of the inverse-toeprint in nucleotides.
The y-axis shows the counts of inverse-toeprints, either absolute or normalized per million reads.
Each replicate is plotted independently and distinguished by the hue attribute in the plot.
Examples
>>> sample.itp_len_plot()