Skip to content

Conversation

@lucatreide
Copy link
Collaborator

Description

Adds new MulitFLEX-LF method to PROTzilla.

Changes

A new file was creared for MultiFLEX-LF. Changes where you would expect them for adding a new method.

Testing

Tests will be added in the future.

@github-actions
Copy link

github-actions bot commented Jul 8, 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 37-48, 122, 171
  differential_expression_t_test.py
  protein_graphs.py
  ptm_analysis.py 115-116, 134-136
  protzilla/data_analysis/ptm_quantification
  multiflex.py 41-397, 415-477, 488-531, 543-590, 598-615, 631-761
  protzilla/data_integration
  di_plots.py
  enrichment_analysis_gsea.py
  protzilla/data_preprocessing
  outlier_detection.py
  transformation.py
  protzilla/importing
  ms_data_import.py 122, 276
  protzilla/methods
  data_analysis.py 730, 758, 761-767
  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
  ui/runs/forms
  data_analysis.py 1073-1074
Project Total  

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

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

@@ -0,0 +1,567 @@
import logging
Copy link
Collaborator

Choose a reason for hiding this comment

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

this file should be deleted


# check if colormap is valid
try:
custom_cmap = copy(plt.get_cmap(color_map))
Copy link
Collaborator

Choose a reason for hiding this comment

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

when selecting "red-yellow-blue" as "Color mat used for heatmap" the following error occurres:

  File "C:\Users\janni\PycharmProjects\PROTzilla2\protzilla\steps.py", line 76, in calculate
    output_dict = self.method(self.inputs)
                  ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\janni\PycharmProjects\PROTzilla2\protzilla\methods\data_analysis.py", line 757, in method
    return multiflex_lf(**inputs)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\janni\PycharmProjects\PROTzilla2\protzilla\data_analysis\ptm_quantification\multiflex.py", line 224, in multiflex_lf
    custom_cmap = copy(plt.get_cmap(color_map))
                                    ^^^^^^^^^
UnboundLocalError: cannot access local variable 'color_map' where it is not associated with a value``` 

and facilitates the analysis of modification dynamics and coregulated modifications across large datasets without the need for preselecting specific proteins.

Parts of the implementation have been adapted from https://gitlab.com/SteenOmicsLab/multiflex-lf.
"""
Copy link
Collaborator

Choose a reason for hiding this comment

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

document input parameters

end = time.time()
message = dict(
level=logging.INFO,
msg=f"Finished with MultiFLEX-LF analysis in ~{end-start:.1f} seconds.",
Copy link
Collaborator

Choose a reason for hiding this comment

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

should this displayed to the user? (we never do this for other methods)

elif colormap == 6:
color_map = "RdYlGn"
elif colormap == 7:
color_map = "RdYlBu"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe use an array or dictionary here instead


# ignore nan-slice warnings
# with warnings.catch_warnings():
# warnings.filterwarnings("ignore", r"All-NaN (slice|axis) encountered")
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove this code instead of commenting it

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.

4 participants