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

Move calculation and plot methods #17

Merged
merged 56 commits into from
Mar 16, 2023

Conversation

saragrau
Copy link
Collaborator

PR for #9

The methods by_low_frequency, by_median, by_totalsum and by_reference_protein were moved to PROTzilla2. Each method has its corresponding function by_low_frequency_plot, by_median_plot, by_totalsum_plot and by_reference_protein_plot, that returns the plot for the corresponding method.

Also the tests for this methods were moved to PROTzilla2 and fixtures are now used for the setup.

Analogously to the perform_calculation_from_location and perform_calculation, the methods create_plot_from_location and create_plot call the corresponding plot with the appropriate parameters. For this purpose it also exists a plot_map.

@antonneubauer antonneubauer linked an issue Mar 13, 2023 that may be closed by this pull request
@github-actions
Copy link

github-actions bot commented Mar 13, 2023

Coverage report

The coverage rate went from 79.67% to 84.05% ⬆️
The branch rate is 61%.

88.6% of new lines are covered.

Diff Coverage details (click to unfold)

protzilla/constants/paths.py

100% of new lines are covered (100% of the complete file).

protzilla/run_manager.py

0% of new lines are covered (0% of the complete file).
Missing lines: 1, 3, 4, 7, 8, 9, 11, 12, 13, 14, 16, 18, 20, 21, 22, 23, 25, 26, 27

protzilla/data_preprocessing/plots.py

90.14% of new lines are covered (90% of the complete file).
Missing lines: 368, 379, 380, 381, 389, 390, 392

protzilla/importing/ms_data_import.py

93.75% of new lines are covered (94.44% of the complete file).
Missing lines: 32

tests/protzilla/data_preprocessing/test_filter_proteins.py

93.75% of new lines are covered (88.88% of the complete file).
Missing lines: 48

protzilla/data_preprocessing/outlier_detection.py

92.85% of new lines are covered (83.33% of the complete file).
Missing lines: 151, 169, 178, 219

protzilla/data_preprocessing/normalisation.py

98.92% of new lines are covered (97.39% of the complete file).
Missing lines: 251

protzilla/utilities/transform_dfs.py

100% of new lines are covered (100% of the complete file).

tests/protzilla/data_preprocessing/test_transformation.py

94.28% of new lines are covered (89.74% of the complete file).
Missing lines: 122, 137

protzilla/workflow_manager.py

0% of new lines are covered (0% of the complete file).
Missing lines: 1, 4, 5, 6, 7, 8, 9

tests/protzilla/test_run.py

100% of new lines are covered (100% of the complete file).

protzilla/run.py

76.74% of new lines are covered (68.51% of the complete file).
Missing lines: 12, 13, 14, 15, 16, 17, 18, 64, 69, 70, 81, 82, 85, 119, 120, 121, 122, 123, 124, 125

protzilla/constants/constants.py

100% of new lines are covered (100% of the complete file).

protzilla/history.py

96.87% of new lines are covered (95.34% of the complete file).
Missing lines: 32, 133

protzilla/data_preprocessing/filter_samples.py

96.15% of new lines are covered (90% of the complete file).
Missing lines: 65

tests/protzilla/data_preprocessing/test_imputation.py

72.28% of new lines are covered (61.85% of the complete file).
Missing lines: 140, 141, 145, 154, 155, 165, 166, 170, 179, 180, 190, 191, 195, 204, 205, 216, 220, 233, 244, 245, 246, 258, 259

protzilla/data_preprocessing/filter_proteins.py

86.66% of new lines are covered (73.68% of the complete file).
Missing lines: 54, 55

tests/conftest.py

100% of new lines are covered (100% of the complete file).

protzilla/data_preprocessing/imputation.py

98.64% of new lines are covered (97.72% of the complete file).
Missing lines: 138

tests/protzilla/data_preprocessing/test_normalisation.py

93.33% of new lines are covered (88.23% of the complete file).
Missing lines: 309, 325, 342, 366

tests/protzilla/data_preprocessing/test_plots.py

82.97% of new lines are covered (79.36% of the complete file).
Missing lines: 21, 40, 57, 82, 117, 118, 119, 120

protzilla/data_preprocessing/transformation.py

90% of new lines are covered (82.14% of the complete file).
Missing lines: 31, 53

tests/protzilla/test_history.py

100% of new lines are covered (100% of the complete file).

protzilla/constants/location_mapping.py

100% of new lines are covered (100% of the complete file).

tests/protzilla/data_preprocessing/test_outlier_detection.py

86.95% of new lines are covered (79.31% of the complete file).
Missing lines: 43, 52, 59

tests/protzilla/data_preprocessing/test_filter_samples.py

93.1% of new lines are covered (87.87% of the complete file).
Missing lines: 73, 98

@antonneubauer antonneubauer self-requested a review March 13, 2023 12:31
Copy link
Collaborator

@antonneubauer antonneubauer left a comment

Choose a reason for hiding this comment

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

I made a few small suggestions and commented on some ideas I had.
In addition: I think the tests for filter_samples is missing if I'm not mistaken. Was that by accident or am I overlooking them?

Good work!

protzilla/constants/method_mapping.py Outdated Show resolved Hide resolved
protzilla/constants/method_mapping.py Outdated Show resolved Hide resolved
protzilla/constants/method_mapping.py Outdated Show resolved Hide resolved
protzilla/data_preprocessing/normalisation.py Outdated Show resolved Hide resolved
protzilla/data_preprocessing/plots.py Outdated Show resolved Hide resolved
protzilla/data_preprocessing/plots.py Outdated Show resolved Hide resolved
protzilla/constants/method_mapping.py Outdated Show resolved Hide resolved
tests/protzilla/data_preprocessing/test_filter_proteins.py Outdated Show resolved Hide resolved
tests/protzilla/data_preprocessing/test_normalisation.py Outdated Show resolved Hide resolved
@antonneubauer antonneubauer changed the title Move calculation and plot methods WIP: Move calculation and plot methods Mar 14, 2023
This was referenced Mar 14, 2023
@antonneubauer antonneubauer changed the title WIP: Move calculation and plot methods Move calculation and plot methods Mar 15, 2023
Copy link
Collaborator

@antonneubauer antonneubauer left a comment

Choose a reason for hiding this comment

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

looks overall good apart from some minor changes that I think would make sense.
Also: the formatting is broken in many of the files and you should check if your pre-commit hook works properly.

Good work as far as I am concerned!

protzilla/data_preprocessing/filter_proteins.py Outdated Show resolved Hide resolved
protzilla/data_preprocessing/filter_proteins.py Outdated Show resolved Hide resolved
protzilla/data_preprocessing/imputation.py Outdated Show resolved Hide resolved
protzilla/data_preprocessing/imputation.py Outdated Show resolved Hide resolved
protzilla/data_preprocessing/imputation.py Outdated Show resolved Hide resolved
tests/conftest.py Outdated Show resolved Hide resolved
tests/protzilla/data_preprocessing/test_filter_proteins.py Outdated Show resolved Hide resolved
tests/protzilla/data_preprocessing/test_imputation.py Outdated Show resolved Hide resolved
tests/protzilla/data_preprocessing/test_imputation.py Outdated Show resolved Hide resolved
tests/protzilla/data_preprocessing/test_imputation.py Outdated Show resolved Hide resolved
tests/protzilla/test_transform_dfs.py Outdated Show resolved Hide resolved
tests/protzilla/data_preprocessing/test_transformation.py Outdated Show resolved Hide resolved
tests/protzilla/data_preprocessing/test_plots.py Outdated Show resolved Hide resolved
tests/protzilla/data_preprocessing/test_plots.py Outdated Show resolved Hide resolved
tests/protzilla/data_preprocessing/test_plots.py Outdated Show resolved Hide resolved
@antonneubauer antonneubauer self-requested a review March 16, 2023 15:44
Copy link
Collaborator

@antonneubauer antonneubauer left a comment

Choose a reason for hiding this comment

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

idk how you managed to change almost all files without visibly changing them but the parts that actually did look good now!

@antonneubauer antonneubauer merged commit 148ba0e into main Mar 16, 2023
@antonneubauer antonneubauer deleted the move-calculation-and-plot-methods branch March 16, 2023 15:46
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.

move methods and explore plot architecture
5 participants