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

PhILR to transformAssay #677

Closed
TuomasBorman opened this issue Jan 20, 2025 · 5 comments · Fixed by #679
Closed

PhILR to transformAssay #677

TuomasBorman opened this issue Jan 20, 2025 · 5 comments · Fixed by #679

Comments

@TuomasBorman
Copy link
Contributor

Should we add PhilR to transformAssay so that user can apply the transformation similarly to others?

transformAssay(tse, method = "philr")

Currently, it needs to be done "manually"

philr::philr(assay(tse, "counts"), rowTree(tse))

@antagomir
Copy link
Member

The problem is that this transformation changes data dimensions and this does not with assays.

@TuomasBorman
Copy link
Contributor Author

Does it make sense to

a) Give warning and subset TreeSE to match the new dimensions
b) Create a new TreeSE with these new dimensions, and output it inside altExp (probably too complex)
c) Force the new assay to the original dimensions, and fill the values with NA

@antagomir
Copy link
Member

The new features do not match with the original features (= a requirement of an assay). The phILR features correspond to ratios between taxa pairs and this is fundamentally different from abundances of individual taxa.

Forcing assay to accommodate this does not sound a valid approach to me.

Therefore it should be something like altExp where this is stored if a solution is to be found. But then it is not so clear that this is outcome from transformation. Perhaps that's ok?

This question is the reason why we do not have a clear way to incorporate philr yet, there has been no consensus how to do this. But it is a good question, I wish we could come up with a good solution.

@TuomasBorman
Copy link
Contributor Author

I haven't familiarized myself with the method, sorry about that...

I think it might make sense to

  1. Add philr transformed data to altExp
  2. Give message: "philr data is in altExp".

@antagomir
Copy link
Member

Works for me. It means that philr pkg would become a new dependency.

The manpage entry could link to philr package and its manuals for more examples.

Leo

@TuomasBorman TuomasBorman linked a pull request Jan 21, 2025 that will close this issue
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 a pull request may close this issue.

2 participants