Skip to content

Commit

Permalink
bring back dendrogram
Browse files Browse the repository at this point in the history
  • Loading branch information
mschwoer committed Oct 30, 2024
1 parent b9acd0b commit 2b2ef2e
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion alphastats/gui/utils/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class PlottingOptions(metaclass=ConstantsClass):
SAMPLE_DISTRIBUTION_PLOT = "Sampledistribution Plot"
INTENSITY_PLOT = "Intensity Plot"
CLUSTERMAP = "Clustermap"
DENDROGRAM = "Dendrogram"


class StatisticOptions(metaclass=ConstantsClass):
Expand Down Expand Up @@ -321,6 +322,17 @@ def _do_analysis(self):
return clustermap, None, self._parameters


class DendrogramAnalysis(AbstractAnalysis):
"""Widget for Dendrogram analysis."""

_works_with_nans = False

def _do_analysis(self):
"""Draw Clustermap using the Clustermap class."""
dendrogram = self._dataset.plot_dendrogram()
return dendrogram, None, self._parameters


class DifferentialExpressionAnalysis(AbstractGroupCompareAnalysis):
"""Widget for differential expression analysis."""

Expand Down Expand Up @@ -447,7 +459,7 @@ def _do_analysis(self):
PlottingOptions.SAMPLE_DISTRIBUTION_PLOT: SampleDistributionPlot,
PlottingOptions.INTENSITY_PLOT: IntensityPlot,
PlottingOptions.CLUSTERMAP: ClustermapAnalysis,
# "Dendrogram": dataet.plot_dendrogram}, # TODO this was commented out in the original code?
PlottingOptions.DENDROGRAM: DendrogramAnalysis,
StatisticOptions.DIFFERENTIAL_EXPRESSION: DifferentialExpressionAnalysis,
StatisticOptions.TUKEY_TEST: TukeyTestAnalysis,
StatisticOptions.ANOVA: AnovaAnalysis,
Expand Down

0 comments on commit 2b2ef2e

Please sign in to comment.