Repository navigation
Feature: tl.infer_proteoform_groups() - #44
Merged
Merged
Conversation
Wrapper over the currently recommended proteoform inference approach.
The `method` default ("copf") may change in future releases, so the
docstring advises passing it explicitly for reproducibility.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Documentation build overview
6 files changed ·
|
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.
Summary
Adds
pr.tl.infer_proteoform_groups(), a single entry point for proteoform group inference. Users currently have to chain fourpr.tlCOPF calls with the right arguments; this wrapper runs the currently recommended approach in one call. It is deliberately dynamic: the defaultmethodtracks whatever approach is recommended and may change in future releases, so the docstring tells users to passmethodexplicitly for reproducible results.Related issues
None
General checklist
HISTORY.mdupdated under[Unreleased]✨ Feature
What it adds:
method="copf"(the current default) is equivalent to:Methods are registered in a
METHODSdict inproteopy/tl/proteoform_group_inference.py, so a future approach is one new function plus one entry, and changing the recommendation means editingDEFAULT_METHOD. Before running, the function rejects protein-level data, an unknownmethod, abatch_keymissing from.obs, non-numeric thresholds, and amin_adj_pvaloutside (0, 1].Example usage:
check_proteodataon entry and exit,inplace,verbose)tests/tl/test_proteoform_group_inference.py, 16 tests)docs/sphinx/source/api/tl.rst)Referencessection. The wrapper adds no new algorithm; tests assert its.varand.unsoutput equals running the four COPF steps by hand, with and withoutbatch_keyNotes for reviewers
methodis positional (infer_proteoform_groups(adata, "copf")works); the other parameters are keyword-only.min_adj_pvaldocstring does not mention the (0, 1] range that_validate_argsenforces.pairwise_peptide_correlations_inproteopy/tl/copf.pyjoins peptide pairs as"pepA_pepB"and splits on_, so anypeptide_idcontaining an underscore raisesValueError: Columns must be same length as key. The test fixture uses sequence-like IDs to avoid it; it should get its own fix.🤖 Generated with Claude Code