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

color selection for enrichment analysis bar plot #556

Open
wants to merge 11 commits into
base: dev
Choose a base branch
from

Conversation

noLeonardo
Copy link
Collaborator

@noLeonardo noLeonardo commented Nov 27, 2024

Description

merged the selection form, from gen_sets selection and color selection to a single form

Changes

  • custom field
  • form for enrichment analysis bar blot
  • updating the corresponding tests to the various input formats

Testing

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

Copy link

github-actions bot commented Dec 2, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  protzilla
  run.py
  run_helper.py
  protzilla/data_analysis
  differential_expression_helper.py 125, 143
  differential_expression_kruskal_wallis.py 227
  differential_expression_mann_whitney.py 266
  differential_expression_t_test.py
  plots.py
  protein_graphs.py
  ptm_analysis.py 56, 123-125
  protzilla/data_integration
  di_plots.py 106
  protzilla/data_preprocessing
  outlier_detection.py
  plots.py
  transformation.py
  protzilla/importing
  ms_data_import.py 122, 276
  protzilla/methods
  data_analysis.py 21, 174, 250, 283, 308, 351, 916, 935
  data_preprocessing.py
  importing.py 144
  protzilla/utilities
  transform_dfs.py
  ui/main
  settings.py
  ui/runs
  fields.py
  views.py 21, 250, 284
  views_helper.py
  ui/runs/forms
  custom_fields.py 89, 96-97, 105-106, 109-128, 133, 136-144
  data_analysis.py 318-322, 379, 409, 445, 468, 1183, 1221, 1243
  data_integration.py
Project Total  

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

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

@noLeonardo noLeonardo marked this pull request as ready for review December 2, 2024 12:55
super().__init__(choices=choices, initial=initial, *args, **kwargs)
else:
super().__init__(
choices=[(el.value, el.value) for el in choices],
Copy link
Collaborator

Choose a reason for hiding this comment

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

Das "el in choices" ist nicht so clean, benenne das lieber in sowas wie choice in choices um. Gerne dann auch für den Rest der Datei 👍

@@ -25,7 +25,7 @@ def test_enrichment_bar_plot_restring(show_figures, helpers):
top_terms=10,
cutoff=0.05,
value="fdr",
gene_sets=["KEGG", "Process"],
gene_sets={"KEGG" : "#E2A46D", "Process" : "#4A536A"},
Copy link
Collaborator

Choose a reason for hiding this comment

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

Die ganzen Hex-Strings gerne als Variable zusammengefasst, sodass man die mit einem Mal alle ändern kann.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Vielen Dank für die Idee, aber diese wäre an dieser Stelle nicht passend, da es sich um eine Test-Datei handelt. Die erstellten Plots werden nicht visuell betrachtet. An dieser Stelle ist viel mehr wichtig, dass sich der Dateityp von List zu Dict geändert hat und direkt ersichtlich werden soll, dass es sich um einen HEX-Farbwert handelt. Bei einem fehlgeschlagenen Test ist somit direkt klar, welche Parameter zu einem Fail geführt haben.

@@ -539,7 +540,8 @@ class PlotGOEnrichmentBarPlotForm(MethodForm):
input_df_step_instance = CustomChoiceField(
choices=[], label="Choose dataframe to be plotted"
)
gene_sets = CustomMultipleChoiceField(choices=[], label="Sets to be plotted")
# TODO: update PLOT_COLOR_SEQUENCE (color, color) for color in PLOT_COLOR_SEQUENCE
Copy link
Collaborator

Choose a reason for hiding this comment

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

Schön schonmal an die kommenden Schritte gedacht, aber mach bitte noch ne Karte im Notion draus und referenziere im Todo, wann genau das umgesetzt werden kann.

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.

2 participants