Back to API
API Documentation

utility

Category: Data Processing

Classes

lazypair

Methods

init(dataset, column_name)
get_index()
get_name()
get_meta()
get_column_name()
get_dataset()

gen_page

Methods

init(data_path)

This function takes in the path to the data folder and returns the HTML files for the OPLS-DA plots.

Parameters
  • data_path: str The path to the data folder. gen_page(data_path).get_files()
get_files()

oplsda_path

Methods

init(data_path)
make_path()
get_path()

Normality_distribution

Methods

init(data)
plot_distribution(feature)
pca_distributions()

Normalise

Methods

init(data, compute_missing)
pqn_normalise(ref_index, plot)
decimal_place_normalisation(decimals)

This function returns the dataframe with values rounded to a specified number of decimal places.

Parameters
  • decimals: int The number of decimal places to round to.
z_score_normalisation()

This function returns the dataframe normalized using Z-Score.

linear_normalisation()

This function returns the dataframe normalized using Min-Max (linear normalization).

normalize_to_100()

This function returns the dataframe with values normalized to 100.

clipping_normalisation(lower, upper)

This function returns the dataframe with values clipped to the specified range.

Parameters
  • lower: float The lower bound for clipping.
  • upper: float The upper bound for clipping.
standard_deviation_normalisation()

This function returns the dataframe normalized using Standard Deviation.

UnivarStats

Perform univariate statistical analysis and visualization using Plotly.

Constructor Parameters

  • df: pd.DataFrame Input DataFrame containing the measurement and group columns.
  • x_col: str Column name for the grouping variable.
  • y_col: str Column name for the measurement variable.
  • group_order: list of str, optional Custom group plotting order.
  • custom_colors: dict of str -> str, optional Mapping from group name to color.
  • stats_options: list of str, optional
  • Supported: ["t-test", "anova", "nonparametric", "effect-size"].
  • p_value_threshold: float, default=0.05 Significance threshold.
  • annotate_style: symbol, default='value' Annotation style: numeric or stars.
  • y_offset_factor: float, default=0.35 Vertical spacing factor for annotations.
  • show_non_significant: bool, default=True Whether to display 'ns'.
  • correct_p: str or None, default='bonferroni' Method for multiple testing correction. Supported: - 'bonferroni', 'holm', 'hochberg', 'hommel' - 'fdr_bh', 'fdr_by', 'fdr_tsbh', 'fdr_tsbky' - None or 'none' = no correction
  • title_: str, optional Plot title.
  • y_label: str, optional Y-axis label.
  • x_label: str, optional X-axis label.
  • fig_height: int, default=800 Figure height.
  • fig_width: int, default=600 Figure width.
  • plot_type: violin, default='box' Plot type.
  • show_axis_lines: bool, default=True Whether to show axis lines.

Methods

init(df, x_col, y_col, group_order, custom_colors, stats_options, p_value_threshold, annotate_style, y_offset_factor, show_non_significant, correct_p, title_, y_label, x_label, fig_height, fig_width, plot_type, show_axis_lines)
compute_effsize(a, b, eftype)
plot(show_description)
get_stats_table()

Return a DataFrame of statistical results.

Functions

project_name_generator()