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

Refactor readers i #232

Merged
merged 12 commits into from
Nov 18, 2024
Merged

Refactor readers i #232

merged 12 commits into from
Nov 18, 2024

Conversation

mschwoer
Copy link
Contributor

@mschwoer mschwoer commented Nov 13, 2024

Some refactorings of the PSM readers

  • use _psm_df iternally instead of psm_df (first commit)

  • simplify column_mapping initialization (second commit)

  • Introduce string constants to access the data frames in the reader classes.
    Benefits: the relation between the different locations where columns are accessed becomes transparent.

@jalew188
Copy link
Collaborator

LGTM!

Copy link
Collaborator

@GeorgWa GeorgWa left a comment

Choose a reason for hiding this comment

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

Looks good!
Two comments from my side:

  • although the readers have the psm_df the same data frame is called precursor_df in the rest of the codebase when present in spectral libraries etc. we could unify this at some point.
  • some of the columns used here are temporary or redundant as they will be removed later. That’s not great software engineering wise but maybe we can mark them with an underscore.

Copy link
Collaborator

@GeorgWa GeorgWa left a comment

Choose a reason for hiding this comment

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

LGTM

alphabase/psm_reader/keys.py Show resolved Hide resolved
alphabase/psm_reader/keys.py Show resolved Hide resolved
@mschwoer
Copy link
Contributor Author

@GeorgWa thanks for the heads up regarding precursor_df & the unused columns, noted.

Base automatically changed from add_psm_reader_tests to development November 15, 2024 08:32
@mschwoer mschwoer merged commit 7cf2f55 into development Nov 18, 2024
2 checks passed
@mschwoer mschwoer deleted the refactor_readers_I branch November 18, 2024 08:32
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