Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple dataset from statistics #329

Merged
merged 19 commits into from
Sep 20, 2024

Conversation

mschwoer
Copy link
Contributor

@mschwoer mschwoer commented Sep 17, 2024

This is a huge one, but could not be separated in a sensible way..
check the individual commits for the line of reasoning (the bug in fc calculation in de72c6e is removed again later

I think now I see where this could be going: the DataSet class will contain the data (mat, metadata) and beside that be just a convenient interface for the frontend. It will offer all operations that can be done on the data (statistics, plots, preprocessing), but delegate the logic to dedicated classes. Two things are missing still:

  • decoupling from Plots
  • moving the logic in init (i.e. the actual data loading) to another class (similar to Statistics, ..)

@mschwoer mschwoer marked this pull request as ready for review September 17, 2024 16:36
Base automatically changed from decouple-dataset-from-enrichment to development September 20, 2024 13:27
# Conflicts:
#	alphastats/DataSet_Statistics.py
#	alphastats/gui/utils/overview_helper.py
#	alphastats/statistics/DifferentialExpressionAnalysis.py
#	tests/test_DataSet.py
@mschwoer mschwoer merged commit 198cbdc into development Sep 20, 2024
5 checks passed
@mschwoer mschwoer deleted the decouple-dataset-from-statistics branch September 20, 2024 21:34
).calculate()
return res, plot_list
# @ignore_warning(RuntimeWarning)
# def multicova_analysis( # TODO never used outside of tests .. how does this relate to multicova.py?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In MultiCovaAnalysis multicova.py is imported from the calculate function.

    def calculate(self):
        from alphastats.multicova import multicova

This is defenitely a feature we want in the tool, so it should remain active but we need a ticket for putting it in the interface.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -386,7 +386,3 @@ def load_options():
st.session_state[StateKeys.STATISTIC_OPTIONS] = statistic_options(st.session_state)
# TODO: Check if this should be reintroduced or removed
# st.session_state["interpretation_options"] = interpretation_options


def gui_multicova_analysis():
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add big todo here instead of removing it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think once the time comes, we will be able to reimplement this method :-D

@@ -152,7 +175,7 @@ def _sam_calculate_fdr_line(self):
)

@lru_cache(maxsize=20)
def _sam(self):
def _sam(self): # TODO duplicated?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the last two lines differ from the function in DifferentialExpressionAnalysis

Copy link
Collaborator

@JuliaS92 JuliaS92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@boopthesnoot boopthesnoot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants