Skip to content

465 add scaling step - #467

Merged
Elena-kal merged 4 commits into
devfrom
465-add-scaling-step
Jul 20, 2026
Merged

465 add scaling step#467
Elena-kal merged 4 commits into
devfrom
465-add-scaling-step

Conversation

@Elena-kal

@Elena-kal Elena-kal commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Description

fixes #465
This issue introduces a new step in which the intensity values can be scaled.

Changes

Added the new step to transformations in data_preprocessing and added new tests.

Testing

Create a standard workflow. Add the scaling step (I would assume one would usually want the scaling step after the normalization and log transformation). And check out how the data scales. The min value of the protein df given should map to the minimum value set in the parameters, same with the maximum values.

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 backend code has been formatted with black
  • The frontend code has been formatted with pnpm format and checked with pnpm lint

Code review

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

@Elena-kal Elena-kal self-assigned this Jul 16, 2026
@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  backend/protzilla/data_preprocessing
  transformation.py 132
  backend/protzilla/methods
  data_preprocessing.py 518, 530, 565-570
Project Total  

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

@jorisfu jorisfu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Tested working, but I'd personally add an error when the input max is smaller than the input min. It should work anyway (with the data flipped), but I think most of the time this is not intentional, so I suppose we need at least a warning or an error.

Also we do already have a lerp helper function that could make the code cleaner by using .apply() on the df with that function. Not insisting on this though

Comment thread backend/protzilla/data_preprocessing/transformation.py

@NeleRiediger NeleRiediger left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Seems to work fine and code looks good as well

@Elena-kal
Elena-kal merged commit 9b911a2 into dev Jul 20, 2026
1 check passed
@Elena-kal
Elena-kal deleted the 465-add-scaling-step branch July 20, 2026 11:37
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