Rename tpm to cpm throughout the API (breaking) (2.1.0) - #45
Merged
Conversation
Everywhere "tpm" appeared, the formula was count / total_reads * 1e6 -- CPM, with no transcript-length normalization. Only the name was wrong; for full-length long reads this is the right metric already, since read count is already a direct proxy for molecule count. Also updated tutorial notebooks referencing the old tpm= API, since there's no deprecated alias. Bumps to 2.1.0 (minor, since this breaks existing code).
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
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
Everywhere "tpm" appeared in the API, the formula was
count / total_reads_in_sample * 1e6-- CPM, with no transcript-length normalization. Renamed throughout to match:transcript_table(cpm=..., cpm_pseudocount=...),_cpm/_sum_cpmcolumns,Gene.cpm(),estimate_cpm_threshold(was in__init__.py's__all__), therun_isotoolsCLI, and all docstrings/plot labels.Clean break, no deprecated alias --
tpm=now raisesTypeError. The computation itself is unchanged (still CPM), so this is a rename, not a math change.Also updated the 6 tutorial notebooks referencing the old
tpm=API/wording, so the published tutorials don't show broken code.Bumps to 2.1.0 (minor, not patch, since this breaks existing user code).
Test plan
pytestsuite passes (20 passed), including a new regression test verifying the CPM formula andGene.cpm()tpm=now raisesTypeErrorflake8/blackcleanpython -m build+twine check dist/*pass at 2.1.0