PermutationTestReport (gesso.PermutationTestReport)
PermutationTestReport is a class that encapsulates the results of GESSO’s permutation-based hypothesis test for identifying spots with significantly elevated gene set activity scores (GASs).
- class gesso.PermutationTestReport(geneset: str, permutation_test_df: DataFrame)[source]
Report object for storing GESSO permutation test results.
- gas_df() DataFrame[source]
Returns the geneset activity scores DataFrame.
- Returns:
DataFrame containing the geneset activity scores.
- Return type:
pd.DataFrame
- htest_df() DataFrame[source]
Returns the full permutation test DataFrame.
- Returns:
DataFrame containing the full permutation test results. Contains four columns: ‘x’, ‘y’, ‘gas’, ‘p’.
- Return type:
pd.DataFrame
- locations_df() DataFrame[source]
Returns the locations DataFrame.
- Returns:
DataFrame containing the locations of the spots. Contains two columns: ‘x’ and ‘y’.
- Return type:
pd.DataFrame
- plot_gas_spatial_map(size: int = 20, cmap: Colormap | str = 'viridis', show_coords: bool = False, figsize: tuple[float, float] = (5.0, 5.0), ax: Axes | None = None) Figure[source]
Plots the gene set activity scores of the permutation test across all locations.
- Parameters:
size (int) – Default: 20. The size of the scatter points.
cmap (Colormap | None) – Default: “viridis”. The colormap to use for the scatter plot.
show_coords (bool) – Default: False. If True, shows the coordinates of the points.
figsize (tuple[float, float]) – Default: (5.0, 5.0). The size of the figure.
ax (plt.Axes | None) – Default: None. If None, creates a new figure.
- plot_pval_spatial_map(size: int = 20, significance_threshold: float = 0.05, significant_color: str | Any = '#800080', not_significant_color: str | Any = '#D3D3D3', show_coords: bool = False, figsize: tuple[float, float] = (5.0, 5.0), ax: Axes | None = None) Figure[source]
Plots the p-values of the permutation test across all locations.
- Parameters:
size (int) – Default: 20. The size of the scatter points.
significance_threshold (float) – Default: 0.05. The threshold for significance.
significant_color (str) – Default: “#800080”. The color for significant points.
not_significant_color (str) – Default: “#D3D3D3”. The color for not significant points.
show_coords (bool) – Default: False. If True, shows the coordinates of the points.
figsize (tuple[float, float]) – Default: (5.0, 5.0). The size of the figure.
ax (plt.Axes | None) – Default: None. If None, creates a new figure.