troutpy.pl.logfoldratio_over_noise#
- troutpy.pl.logfoldratio_over_noise(sdata, control_key='control_probe', test_method='auto', figures_path='', save=False, custom_plot_filename=None, palette='troutpy')#
Creates a violin plot comparing logfoldratio_over_noise values for controlvs non-control probes, and tests for significance using the specified test.
- Parameters:
sdata (spatialdata.SpatialData) – SpatialData object that contains ‘xrna_metadata’ with ‘var’ DataFrame.
control_key (str) – The column in var indicating which probes are controls.
test_method (str) –
- Statistical test to use. Options:
”t-test” → Welch’s t-test
”mannwhitney” → Mann-Whitney U-test
”auto” (default) → Chooses test based on normality test.
figures_path (str) – Directory to save the figure.
save (str) – If True, saves the figure as a PDF in the specified path.
custom_plot_filename (str) – Custom filename for the saved plot.
palette (str) – Matplotlib palette name or list of two colors. Default is [“lightgrey”, “black”].
- Return type: