Repository navigation
Conversation
…430) * fix(peptideatlas): count each phospho form's own observations (#425) parse_peptideatlas_zip added the parent peptide_instance.n_observations, which also covers the unmodified and every other form of the peptide, once per phospho-modified form, instead of each form's own modified_peptide_instance.n_observations. On the real build 202512/606 that inflated 237,428 of 259,932 sites (82x in total, median 16x per site; Spearman 0.82 against the corrected counts). - Step 4 sums each form's own count; step 2 keeps only the peptide instance ids. A phospho form without an integer count fails the parse. - Fixture: peptide_instance 209, seen 100 times, in two phospho forms (12 and 8 observations) at P04637 S42. The old rule gives 200, the new one 20; the snapshot pins 20 and the round trip expects six sites. - test_phospho.py: the mocks give each form its own count (equal to the parent's, so expected values hold); two regression tests cover the two-form sum and a form without a count. - SKILL.md, the fixture README and the CHANGELOG describe the rule. * docs(changelog): this fix is #430 * fix(peptideatlas): address the #430 review - Read a form's count only when it maps to a kept protein: a phospho form of a peptide that maps only to decoy or non-canonical proteins adds nothing and may lack a count. - Fixture: peptide 209 gets its own peptide_id (1009) and its unmodified form (80 observations), so its forms sum to the peptide's 100 as in real builds; a rule summing every form would give 100, not 20. - Tests: _two_form_zip adds the unmodified form; a parametrized test pins that unmodified forms and forms of unkept peptides are not checked. - Rebuilding: hvantk download returns an existing parsed TSV unchanged, so CHANGELOG and SKILL.md say to delete it or pass --overwrite. The plugin version moves to 0.1.1 so provenance tells the builds apart. - Real build 606: every peptide's form counts sum to its own count; the 508,098 repeated peptide_mapping keys involve only dropped proteins, so no site is counted twice through them (documented in SKILL.md).
#428 was merged into main directly, so dev did not have it. Both branches had changed the PeptideAtlas parser: #428 hardened it on main, and #430 changed its counting rule on dev. They conflicted in hvantk/skills/peptideatlas/phospho/shared/datasets.py, in step 2. Resolution: keep #430's set of peptide_instance ids, since counts now come from each modified form. Keep #428's required-column check, applied to the one column step 2 still reads (peptide_instance_id). #428 also required peptide_instance.n_observations; that requirement is dropped, because the parser no longer reads that column.
Since #430, the parser counts each phospho form's own modified_peptide_instance.n_observations. #428's required-column checks were written against the old rule, and #430's tests predate those checks. - modified_peptide_instance must have an n_observations column. If the column is renamed, the parse now fails up front with "missing required column", instead of failing on the first contributing row. - test_parse_rejects_missing_required_columns now renames that column instead of peptide_instance.n_observations, which the parser no longer reads. - _two_form_zip's biosequence table gets biosequence_gene_name, which #428 made required. Without it, every #430 regression test failed on the column check. - The empty-canonical-table test gets n_observations in its modified_peptide_instance table, so its other tables stay valid, as its comment says. Every required column is present in the real build 606 tables.
Merge main into dev: bring #428 onto dev
Contributor
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Documentation | 38 minor |
| Security | 22 high |
| Complexity | 4 medium |
🟢 Metrics 59 complexity
Metric Results Complexity 59
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
6 tasks
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Releases
devtomain.mainis already an ancestor ofdev, so this merges without conflicts.What's in it
#430: PeptideAtlas site counts (#425)
parse_peptideatlas_zipadded each peptide's total count once for every phospho form. A site is now credited with each form's own count.peptideatlas:phosphotable built before this release. Delete the cached parsed TSV first, or pass--overwrite.#431: brings #428 onto
dev#428 was merged into
maindirectly. #431 mergesmainback intodevand reconciles #428's PeptideAtlas column checks with #430's counting.#433: fixes from the post-merge review of #428
cosmic-cgc-v2orcosmic-cgc-legacy-v1. A gene catalog that resolves no symbol now raises. The plugin version moves to 0.2.0.peptide_instance.tsvcan no longer return the modified table.build_parametersis stored as a JSON copy when the provenance is stamped.Checks
dev(e80b464) is green.Open follow-ups: #432, #426, #420, #419, #416.