Closed
Conversation
…ing in mouse data
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR cleans up unused imports and adjusts function parameters, including removing the regularization parameter from the pf2 function while adding a deviance transformation option.
- Removed unused imports and replaced csr_matrix with csr_array in pf2rnaseq/imports.py.
- Introduced a new function (prepare_dataset_deviance) for deviance transformation and updated the import_Heiser function to support it.
- Removed the regParam parameter in pf2 within pf2rnaseq/factorization.py.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pf2rnaseq/imports.py | Removed unused imports; added prepare_dataset_deviance and updated import_Heiser to optionally apply deviance transformation. |
| pf2rnaseq/factorization.py | Updated pf2 function by removing the regularization parameter from its signature and call. |
Comments suppressed due to low confidence (2)
pf2rnaseq/imports.py:142
- In import_Heiser, prepare_dataset is applied unconditionally after the deviance branch, which may result in double processing when deviance is true. Consider returning data immediately after prepare_dataset_deviance to avoid reapplying normalization.
return prepare_dataset(data, "sample_id", geneThreshold=0.1)
pf2rnaseq/factorization.py:39
- The removal of the regParam parameter from the pf2 function changes its API. Confirm that parafac2_nd and any downstream processing do not rely on L2 regularization, or update the documentation to reflect this change.
tolerance=1e-9,
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.
There are quite a few imports I do not use in the imports file that I deleted. Unsure if we want to keep them. Also, there are cells labeled as doublets in the mouse cytokine data so removing that when importing. Also removing regularization parameter variable in the pf2 function.