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 documentation | PSM reader tutorial #306

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

lucas-diedrich
Copy link
Contributor

@lucas-diedrich lucas-diedrich commented Mar 17, 2025

Refactor PSM reader tutorial. This PR restructures the PSM reader tutorial in background (Basic/Advanced), Code, Advanced examples. Comparison old/new attached

Tutorial

Theory

  • (Basic) Add theoretical background on precursor-spectrum-match reports
  • (Advanced) Outline alphabase workflow

Code

  • Streamline examples (remove duplicates)
  • Add example on custom arguments

Tests

  • Move tested examples (tested by notebook-test workflow) to designated test module (/tests/unit/psm_reader/test_psm_reader_provider.py)

Edit: Just saw PR #305, but this PR seems to be complementary

Missing

Short example on implementing a custom reader. This is currently not easily possible as at the moment the modification_mapping has to be hard coded in alphabase.psm_reader.psm_reader_yaml (see new ticket)

tutorial_new.pdf
tutorial_old.pdf

@lucas-diedrich lucas-diedrich requested a review from jalew188 March 17, 2025 17:02
Copy link
Contributor

@mschwoer mschwoer left a comment

Choose a reason for hiding this comment

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

LGTM! thanks for the effort!



def test_read_psm(psm_example):
search_engine, data, expected_shape = psm_example
Copy link
Contributor

Choose a reason for hiding this comment

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

could add a one-line docstring descibing the intent of the test and a # when before df = psm_reader.import_file(copy(data)) to be able to quickly spot where the code under test is called

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! First time I learned about the given, when, then structure in unittests!

Copy link
Contributor

Choose a reason for hiding this comment

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

#1) ad "E.g. the MaxQuant-internal representation" -> the table looks off, at least in GitHub
image

#2) display of psm_reader_provider.reader_dict could be psm_reader_provider.reader_dict.keys()

The search engine overview is really cool!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! Fixed the table formatting + changed the representation of the currently available readers.

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