biocore / gemelli

Gemelli is a tool box for running Robust Aitchison PCA (RPCA), Joint Robust Aitchison PCA (Joint-RPCA), TEMPoral TEnsor Decomposition (TEMPTED), and Compositional Tensor Factorization (CTF) on sparse compositional omics datasets.
BSD 3-Clause "New" or "Revised" License
76 stars 17 forks source link

Performing the robust Aitchison transformation prior to interpretative multivariate analysis (db-RDA) #105

Open magibc opened 3 weeks ago

magibc commented 3 weeks ago

Dear @cameronmartino Cameron,

The RPCA tool inside Gemelli performs these two steps:

  1. Compositional preprocessing using the centered log ratio transform on only the non-zero values of the data (no pseudo count)
  2. Dimensionality reduction through Robust PCA on only the non-zero values of the data ( matrix completion).

I can also perform Step 1 using the decostand() function from the R package vegan with the method rclr.

However, for the second step of creating the PCA using only non-zero values (as Gemelli creates a PCA), I would like to know if any R package could perform this second step to graph a db-RDA. I was not capable to found one R package.

The function cmdscale allows me to use the robust Aitchison method, but I'm unsure if it performs Step 2 as Gemelli does. That's why I'm asking you.

Thank you again,

Magi

cameronmartino commented 3 weeks ago

Hi @magibc,

There is an RPCA function (step 2) in the works for R (will be in vegan) but it is not ready yet and won't match Gemelli, hopefully it will be soon. To my knowledge there is no working version in R anywhere else yet. For now I advise relying on the python version and I can report back here when the R version of step 2 (RPCA) is done.

Thanks!

Cameron

magibc commented 3 weeks ago

Thank you very much,

Ok, for the moment I will use your robust.aitchison method included in vegan package and I will find Robust PCA in another R Package. Yes, keep me informed when it is implemented in Gemelli. Thanks again.

Magí.

cameronmartino commented 3 weeks ago

Hi @magibc,

Please use the Python implementation in Gemelli. The robust.aitchison method in vegan does not currently match the output in this implementation. I am working on getting the vegan implementation fixed but it is not ready yet and I would not suggest using it.

magibc commented 3 weeks ago

Ok Cameron. Yes I will try to defend the reviewer comments received because I have tried the function fill.OptSpace() of filling R package but I get an error that I am not capable to solve it. Thanks again.

cameronmartino commented 3 weeks ago

Hi @magibc,

The R OptSpace function also does not replicate this package exactly. There have been alterations and bug fixes over the years in this implementation that are not reflected in the OptSpace R package. I am working on making sure that is reflected in the vegan implementation but that is not done yet. For now, stick to this Python package.