Skip to main content
Ctrl+K

iTP-Seq 0.0.1a8 documentation

  • User Guide
  • API reference
  • User Guide
  • API reference

Section Navigation

  • DataSet
    • itpseq.DataSet.reorder_samples
    • itpseq.DataSet.infos
    • itpseq.DataSet.DE
    • itpseq.DataSet.itp_len_plot
    • itpseq.DataSet.report
    • itpseq.DataSet.itoeprint
  • Sample
    • itpseq.Sample.rename
    • itpseq.Sample.copy
    • itpseq.Sample.infos
    • itpseq.Sample.get_counts
    • itpseq.Sample.get_counts_ratio
    • itpseq.Sample.get_counts_ratio_pos
    • itpseq.Sample.DE
    • itpseq.Sample.hmap
    • itpseq.Sample.hmap_grid
    • itpseq.Sample.volcano
    • itpseq.Sample.logo
    • itpseq.Sample.all_logos
    • itpseq.Sample.itp_len_plot
    • itpseq.Sample.itoeprint
  • Replicate
    • itpseq.Replicate.load_data
    • itpseq.Replicate.rename
    • itpseq.Replicate.get_counts
    • itpseq.Replicate.logo
  • API reference
  • Replicate
  • itpseq.Replicate.logo

itpseq.Replicate.logo#

Replicate.logo(logo_kwargs=None, ax=None, fMet=False, type='information', **kwargs)[source]#

Generates a sequence logo based on the aligned inverse-toeprints, using the logomaker library.

Parameters:
  • logo_kwargs (dict, optional) – Additional keyword arguments passed to logomaker.Logo for customizing the sequence logo. Defaults to {‘color_scheme’: ‘NajafabadiEtAl2017’}.

  • ax (matplotlib.axes.Axes, optional) – Pre-existing matplotlib Axes to draw the logo on. A new Axes is created if not provided.

  • fMet (bool, optional) – If False, removes m (formyl-methionine / start codon) from the alignment when building the logo. Defaults to False.

  • type (str, optional) – The transformation type applied to the counts matrix. Possible values include: - ‘information’ for information content. - ‘probability’ for probabilities. Defaults to ‘information’.

  • **kwargs (dict) – Additional keyword arguments passed to filter the input data (e.g., pos, min_peptide, max_peptide…).

Returns:

A logomaker.Logo object representing the sequence logo.

Return type:

logomaker.Logo

Notes

  • Sequence alignment data is first converted to a counts matrix via the logomaker.alignment_to_matrix method.

  • The ribosomal site corresponding to each position is annotated on the x-axis.

  • Transformation of the counts matrix (e.g., counts to information) is performed using logomaker.transform_matrix.

Examples

Simple logo plot with default settings
>>> logo = obj.logo()
Logo plot with min_peptide filtering
>>> logo = obj.logo(min_peptide=3)
Logo plot with custom transformation type and filtering
>>> logo = obj.logo(type='probability', min_peptides=2, fMet=True)

previous

itpseq.Replicate.get_counts

On this page
  • Replicate.logo

© Copyright 2025, Thibaud Renault.

Created using Sphinx 8.1.3.

Built with the PyData Sphinx Theme 0.16.1.