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

Mann whitney test #518

Merged
merged 94 commits into from
Aug 14, 2024
Merged

Mann whitney test #518

merged 94 commits into from
Aug 14, 2024

Conversation

JanniRoebbecke
Copy link
Collaborator

Description

  • Adds new method Mann-Whitney Test for differential Expression testing
  • the new Method exists in two variants one with the operation differential_expression and one the method Peptide analysis
  • the first takes any protein dataframe and returns a dictionary in the same format as the other methods in differential differential_expression. The output may be used to generate a volcano plot
  • the second takes a 'ptm_df' from the a 'PTMs per Sample' Step and returns it's output in wide format

Changes

  • the methods were implemented
  • the Forms and Step Classes have been defined
  • tests were implemented

Testing

  • tests have been implemented
  • import protein, meta and evidence file
  • preprocess
  • add Mann-Whitney Test with operation differential_expression and calculate
  • add 'PTMs per Sample' Step and Mann-Whitney Test with operation Peptide analysis after that and calculate

PR checklist

Development

  • If necessary, I have updated the documentation (README, docstrings, etc.)
  • If necessary, I have created / updated tests.

Mergeability

  • main-branch has been merged into local branch to resolve conflicts
  • The tests and linter have passed AFTER local merge
  • The code has been formatted with black

Code review

  • I have self-reviewed my code.
  • At least one other developer reviewed and approved the changes

janni.roebbecke and others added 30 commits March 23, 2024 15:29
* untested working, needs cleanup

* linter

* remove dupliacte method (merge screw-up)

* add doc strings, fix first few tests (miss. args)

* metadata df now optional param + adjusted asserts, fixed test

* formatting

* conditional metadata input for protein graphs

* import logging levels, formatting

* add grouping tests for peptides, add error handling

* spelling, formatting

* remove unused import, format

* fix error msgs in tests

* fix line length

* Convert has_metadata to property

* Use logger instead of print statement

* An attempt at consistent text-casing

* formatting

---------

Co-authored-by: henninggaertner <[email protected]>
…-file' into peptides

# Conflicts:
#	protzilla/importing/peptide_import.py
#	tests/protzilla/data_preprocessing/test_peptide_preprocessing.py
#	tests/protzilla/importing/test_peptide_import.py
janni.roebbecke added 21 commits June 11, 2024 16:42
…ics-amount

# Conflicts:
#	protzilla/data_analysis/filter_peptieds_of_protein.py
#	ui/runs/forms/data_analysis.py
…ics-amount

# Conflicts:
#	protzilla/data_analysis/ptm_analysis.py
# Conflicts:
#	tests/protzilla/data_preprocessing/test_peptide_preprocessing.py
# Conflicts:
#	protzilla/data_analysis/ptm_analysis.py
#	protzilla/methods/data_analysis.py
#	ui/runs/form_mapping.py
#	ui/runs/forms/data_analysis.py
# Conflicts:
#	protzilla/utilities/transform_dfs.py
#	ui/runs/forms/data_analysis.py
# Conflicts:
#	protzilla/data_analysis/differential_expression_mann_whitney.py
#	protzilla/methods/data_analysis.py
#	protzilla/utilities/transform_dfs.py
#	ui/runs/forms/data_analysis.py
@JanniRoebbecke JanniRoebbecke self-assigned this Jun 25, 2024
Copy link

github-actions bot commented Jun 25, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  protzilla
  run.py
  run_helper.py
  runner.py
  protzilla/data_analysis
  differential_expression_anova.py
  differential_expression_linear_model.py
  differential_expression_mann_whitney.py 263
  differential_expression_t_test.py
  protein_graphs.py
  ptm_analysis.py 115-116, 134-136
  protzilla/data_integration
  di_plots.py
  enrichment_analysis_gsea.py
  protzilla/data_preprocessing
  filter_proteins.py
  outlier_detection.py
  peptide_filter.py
  transformation.py
  protzilla/importing
  ms_data_import.py 122, 276
  protzilla/methods
  data_analysis.py
  data_preprocessing.py
  importing.py 142
  protzilla/utilities
  transform_dfs.py
  utilities.py
  ui/main
  settings.py
  ui/runs
  fields.py
  views.py
  views_helper.py
Project Total  

The report is truncated to 25 files out of 73. To see the full report, please visit the workflow summary page.

This report was generated by python-coverage-comment-action

Copy link
Collaborator

@lucatreide lucatreide left a comment

Choose a reason for hiding this comment

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

lgtm

"""
Perform Mann-Whitney U test on all proteins in the given intensity data frame.

@param intensity_df: A protein dataframe in typical PROTzilla long format.
Copy link
Collaborator

Choose a reason for hiding this comment

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

In docstring parameters should be preceeded by : and not @

@JanniRoebbecke JanniRoebbecke merged commit e6c29e2 into dev Aug 14, 2024
1 check passed
@JanniRoebbecke JanniRoebbecke deleted the mann-whitney-test branch August 14, 2024 18:57
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