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

v0.0.10 #75

Merged
merged 56 commits into from
Jan 18, 2024
Merged

v0.0.10 #75

merged 56 commits into from
Jan 18, 2024

Conversation

cameronmartino
Copy link
Collaborator

v0.0.10 (2023-12-01)

Bug fixes

Features [experimental]

  • rpca projection of new data and with cross validation
    • A new function for RPCA where new data can be projected into an existing ordination.
    • Also allows for internal CV, where the hold out data is projected into the training ordination, which is then used to re-build the test data, and the error between the projection and the real test data is calculated.
  • tempted.py and assocated tests/commands/tutorials
    • Added in a python implementation TEMPTED, more details on the methods inm this paper here.
  • joint-rpca and associated tests/commands/tutorials
    • Joint-RPCA is an extention of RPCA for multiple omics types.
  • qc_rarefaction
    • This function compares the mantel correlation of distances to the abs. differences in sample sum between rarefied and unrarefied input data. This is an easy check to ensure the results are not bieng significantly altered by non-rarefaction is cases of large differences (e.g., low-biomass) or where the sample sum differences can not be seperated from the phenotypes/low-rank structure of the data (i.e., deep sequencing of controls and shallow of sick).

Deprecated functionality

@SilasK
Copy link

SilasK commented Dec 20, 2023

Looking forward to the new version.

@SilasK
Copy link

SilasK commented Dec 20, 2023

I'm testing this branch and have some comments.

Don't forget to include in the release notes the breaking change from

from auto_rpca to gemelli.rpca import rpca

Using simulated random data I get the

gemelli/gemelli/preprocessing.py:426: RuntimeWarning: divide by zero encountered in log
  mat = np.log(matrix_closure(mat))

@cameronmartino
Copy link
Collaborator Author

Thanks, @SilasK! That warning can be ignored, it is meant to be suppressed within Gemelli but if numpy is re-imported before running RPCA it will get un-suppressed. Not sure how to fix that or if I want to since the user might want that warning for other parts of their own code. It comes from the RCLR command where the infs/-infs/NaNs are later ignored. If you want to suppress it in your scripts add

numpy.seterr(divide = 'ignore')

after your numpy import.

Let me know if you run into any other issues/comments on the new branch!

@SilasK
Copy link

SilasK commented Dec 21, 2023

Maby there is a divide function that can handle nans.

@SilasK
Copy link

SilasK commented Dec 22, 2023

Otherwise I could use it.

@gibsramen
Copy link
Contributor

Self-assigning for review

@gibsramen
Copy link
Contributor

I have no idea why, but on my end the Joint-RPCA CLI notebook fails at the PERMANOVA step.

image

I managed to fix this with the following change but it's unclear why it even failed.

image

Pandas version is 1.5.3

@cameronmartino
Copy link
Collaborator Author

@SilasK looking into it seems like there are some issues around that (here). That may be why we opted for the way we do it, I don't remember. I opened an issue for it and will look more deeply into this for a future version. Thanks for pointing it out!

@cameronmartino
Copy link
Collaborator Author

@gibsramen Fixed, thanks!

Copy link
Contributor

@gibsramen gibsramen left a comment

Choose a reason for hiding this comment

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

Couple changes requested, thanks!

gemelli/tempted.py Outdated Show resolved Hide resolved
gemelli/optspace.py Show resolved Hide resolved
gemelli/preprocessing.py Outdated Show resolved Hide resolved
@cameronmartino cameronmartino merged commit 190f89e into master Jan 18, 2024
1 check passed
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.

3 participants