Closed antagomir closed 2 weeks ago
1.-2 I think "standardize" is already supported, so only the documentation should be modified (should be checked whether that is the case). The code still could support "z", but we should just avoid using it in documentation.
True, "standardize" should be supported already as a vegan option.
I would anyway deprecate the "z" option because we are not providing it in the more commonly used meaning and this is a potential source of confusion.
I wouldn't bother the vegan developers with this until there is a clear need. This is not critical so perhaps we leave support for "scale" for now, and just updated the documentation + deprecate z.
I agree. Deprecation requires only warning message above this
Great. I suggest that @Daenarys8 will open a PR with the suggested changes.
The
transformAssay
function has the option "z" among transformation methods and this scales the signal to zero mean, unit variance. The name "z" derived from some older code but "z transformation" has a different meaning in signal processing. That meaning is more common. The naming can be therefore confusing and should be changed.Suggestions:
1) rename the "z" method into "standardize", which performs the zero mean, unit variance via vegan::decostand. This would be useful because the mia::transformAssay is already supporting other vegan::decostand transformations.
2) We should not duplicate vegan::decostand documentation; on the same go one should check the roxygen documentation of mia::transformAssay under ""The available transformation methods include: ...". Remove explanations for those methods that have the same name in vegan and are already explained there. Add text mentioning that the methods in vegan::decostand are supported and user should see that documentation for details.
3) Another option is to use base::scale and modify the implementation so that users could pass arguments to the scale function through the transformAssay call. This would allow a wider range of options, such as ignoring centering and only doing the unit variance scaling; then we could do things like
transformAssay(tse, method="scale", center=FALSE)
. Could be useful in principle but on the other hand there is no immediate need. It would be also possible to support this one alongside with vegan::decostand because the mia package has support for all vegan::decostand transformations anyway.