abaco.plots module#

abaco.plots.plotClusterHeatMap(data, batch_label='batch', experiment_label='tissue', sample_label='sample')[source]#

Plot a clustered heatmap of scaled OTU data with batch and experiment metadata.

Parameters:
  • data (pandas.DataFrame) – Input data containing OTU counts and metadata.

  • batch_label (str, optional) – Column name for batch identifiers, by default ‘batch’.

  • experiment_label (str, optional) – Column name for experiment/tissue identifiers, by default ‘tissue’.

  • sample_label (str, optional) – Column name for sample identifiers, by default ‘sample’.

Returns:

Clustergrammer2 widget displaying the clustered heatmap.

Return type:

clustergrammer2.CGM2Widget

abaco.plots.plotOTUBox(data, batch_label='batch')[source]#

Plot boxplots of OTU abundances grouped by batch.

Parameters:
  • data (pandas.DataFrame) – Input data containing OTU counts and metadata.

  • batch_label (str, optional) – Column name for batch identifiers, by default ‘batch’.

Returns:

Displays a Plotly figure with dropdown to select OTUs.

Return type:

None

abaco.plots.plotPCA(data, sample_label='sample', batch_label='batch', experiment_label='tissue')[source]#

Plot Principal Component Analysis (PCA) for batch effect visualization.

Parameters:
  • data (pandas.DataFrame) – Input data containing OTU counts and metadata.

  • sample_label (str, optional) – Column name for sample identifiers, by default ‘sample’.

  • batch_label (str, optional) – Column name for batch identifiers, by default ‘batch’.

  • experiment_label (str, optional) – Column name for experiment/tissue identifiers, by default ‘tissue’.

Returns:

Displays a Plotly figure.

Return type:

None

abaco.plots.plotPCoA(data, method='aitchison', sample_label='sample', batch_label='batch', experiment_label='tissue', mode='base')[source]#

Plot Principal Coordinates Analysis (PCoA) for batch effect visualization.

Parameters:
  • data (pandas.DataFrame) – Input data containing OTU counts and metadata.

  • method (str, optional) – Distance metric to use (‘aitchison’ or ‘bray-curtis’), by default ‘aitchison’.

  • sample_label (str, optional) – Column name for sample identifiers, by default ‘sample’.

  • batch_label (str, optional) – Column name for batch identifiers, by default ‘batch’.

  • experiment_label (str, optional) – Column name for experiment/tissue identifiers, by default ‘tissue’.

  • mode (str, optional) – Plotting mode (‘base’ for batch+experiment, ‘single’ for batch only), by default ‘base’.

Returns:

Displays a Plotly figure.

Return type:

None

abaco.plots.plotRLE(data, sample_label='sample', batch_label='batch', experiment_label='tissue')[source]#

Plot Relative Log Expression (RLE) boxplots for each experiment and batch.

Parameters:
  • data (pandas.DataFrame) – Input data containing OTU counts and metadata.

  • sample_label (str, optional) – Column name for sample identifiers, by default ‘sample’.

  • batch_label (str, optional) – Column name for batch identifiers, by default ‘batch’.

  • experiment_label (str, optional) – Column name for experiment/tissue identifiers, by default ‘tissue’.

Returns:

Displays a Plotly figure with dropdown to select experiments.

Return type:

None

abaco.plots.plot_LISI_perplexity(df_c, df_i, n_samples: int, x_col: str = 'perplexity', y_col_c: str = 'cLISI', y_col_i: str = 'iLISI', title_c: str = 'Biological conservation (cLISI)', title_i: str = 'Batch mixing (iLISI)')[source]#

Plot cLISI and iLISI scores as a function of perplexity.

Parameters:
  • df_c (pandas.DataFrame) – DataFrame containing cLISI scores and perplexity values.

  • df_i (pandas.DataFrame) – DataFrame containing iLISI scores and perplexity values.

  • n_samples (int) – Number of samples in the dataset.

  • x_col (str, optional) – Column name for perplexity values, by default ‘perplexity’.

  • y_col_c (str, optional) – Column name for cLISI scores, by default ‘cLISI’.

  • y_col_i (str, optional) – Column name for iLISI scores, by default ‘iLISI’.

  • title_c (str, optional) – Title for the cLISI subplot, by default ‘Biological conservation (cLISI)’.

  • title_i (str, optional) – Title for the iLISI subplot, by default ‘Batch mixing (iLISI)’.

Returns:

Plotly figure with cLISI and iLISI subplots.

Return type:

plotly.graph_objs._figure.Figure