itpseq.Sample¶
- class itpseq.Sample(*, labels: dict, reference=None, dataset=None, data=None, keys=('sample',), **kwargs)¶
Represents a sample in a dataset, its replicates, reference, and associated metadata.
The Sample class is used to encapsulate information and behavior related to samples in a dataset. It manages details like labels, references, replicates, and metadata, and provides methods for analyzing replicates, performing differential enrichment analysis, and creating visualizations.
- Attributes:
- name_ref
- name_vs_ref
Methods
get_counts_ratio
([pos, factor, exclude_empty])get_counts_ratio_pos
([pos])Computes a DataFrame with the enrichment ratios for each ribosome position.
hmap
([r, c, pos, col, transform, cmap, ...])Generates a heatmap of enrichment for combinations of 2 positions.
hmap_grid
([pos, col, transform, cmap, vmax, ...])Creates a grid of heatmaps for all combinations of ribosome positions passed in pos.
hmap_pos
([pos, cmap, vmax, center, ax])Generates a heatmap of enrichment ratios for amino acid positions across ribosome sites.
itp_len_plot
([ax, min_codon, max_codon, ...])Generates a line plot of inverse-toeprint (ITP) counts per length.
DE
all_logos
get_counts
infos
itoeprint
load_replicates
logo
volcano
- __init__(*, labels: dict, reference=None, dataset=None, data=None, keys=('sample',), **kwargs)¶
Methods
DE
([pos, join, quiet, filter_size, multi, ...])__init__
(*, labels[, reference, dataset, ...])all_logos
([logo_kwargs])get_counts
([pos])get_counts_ratio
([pos, factor, exclude_empty])get_counts_ratio_pos
([pos])Computes a DataFrame with the enrichment ratios for each ribosome position.
hmap
([r, c, pos, col, transform, cmap, ...])Generates a heatmap of enrichment for combinations of 2 positions.
hmap_grid
([pos, col, transform, cmap, vmax, ...])Creates a grid of heatmaps for all combinations of ribosome positions passed in pos.
hmap_pos
([pos, cmap, vmax, center, ax])Generates a heatmap of enrichment ratios for amino acid positions across ribosome sites.
infos
([html])itoeprint
([plot, norm, norm_range, ...])itp_len_plot
([ax, min_codon, max_codon, ...])Generates a line plot of inverse-toeprint (ITP) counts per length.
load_replicates
()logo
([pos, logo_kwargs, ax])volcano
([pos, query, motif, ax, x, y, ...])Attributes
Combines the counts of inverse-toeprints (ITPs) for each length across all replicates.
name_ref
name_vs_ref
toeprint_df