biocore / DEICODE

Robust Aitchison PCA from sparse count data
Other
33 stars 17 forks source link

autorpca returns a column full of zeros #55

Closed mortonjt closed 4 years ago

mortonjt commented 4 years ago

I ran deicode autorpca on a metabolomics dataset and it looks like it leaves the last column full of zeros

Below is the sample table

              0         1    2
SS11  -0.081103 -0.021872  0.0
SS12  -0.080128 -0.022069  0.0
SS13  -0.088931 -0.023368  0.0
SS14   0.030355  0.000813  0.0
SS15   0.024999  0.009538  0.0
SS16   0.022538 -0.012254  0.0
SS17   0.018629  0.025394  0.0
SS18  -0.011207  0.069970  0.0
SS19   0.045029 -0.035136  0.0
SS20   0.013382  0.055876  0.0
SS21   0.027875  0.026442  0.0
SS22   0.007560  0.025413  0.0

Below is the feature table

                                          0         1    2
357.278921944848_6.78255773651635  0.016875 -0.051225  0.0
375.289157255286_6.79100745149911  0.016569 -0.043428  0.0
373.273770443826_5.10086137440758  0.005463 -0.048853  0.0
373.273686528335_4.84083244725738  0.002691 -0.047517  0.0
391.284342734904_6.30942060301507  0.010172 -0.039335  0.0
593.332301456844_4.17454005037783  0.002670 -0.031347  0.0
391.28424008381_5.09922298985167   0.005475 -0.043783  0.0

I'm guessing that this is not a something that we want, right?

cameronmartino commented 4 years ago

@mortonjt that means it is estimating the rank as 2 and then adds a row of zeros to prevent breaking the emperor plots. We could set the minimum estimated rank to 3 and then we would never see this problem. I agree it could be problematic depending on how the loadings are used.

mortonjt commented 4 years ago

oh weird. ok, that shouldn't be a problem then