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
67 stars 17 forks source link

`--p-no-svd-centralized` not working? #82

Closed sjanssen2 closed 3 weeks ago

sjanssen2 commented 4 months ago

computation with active SVD works like a charm

(qiime2-amplicon-2023.9) rs500-bcf-01 x86_64 ~/MicrobiomeAnalyses/Projects/Pandyra_CBP_Mb1-Cre>qiime gemelli tempted-factorize --i-table tempted_counts_CBP_clr.qza --m-sample-metadata-file tempted_meta_CBP.tsv --p-individual-id-column 'host_subject_id' --p-state-column 'timepoint' --output-dir ./gemelli_CBP_noSVD/ --p-n-components 7 --p-svd-centralized
Saved PCoAResults % Properties('biplot') to: ./gemelli_CBP_noSVD/individual_biplot.qza
Saved SampleData[SampleTrajectory] to: ./gemelli_CBP_noSVD/state_loadings.qza
Saved DistanceMatrix to: ./gemelli_CBP_noSVD/distance_matrix.qza
Saved SampleData[SampleTrajectory] to: ./gemelli_CBP_noSVD/svd_center.qza

however, when I try to switch it of via addition of --p-no-svd-centralized, I get the following error:

(qiime2-amplicon-2023.9) rs500-bcf-01 x86_64 ~/MicrobiomeAnalyses/Projects/Pandyra_CBP_Mb1-Cre>qiime gemelli tempted-factorize --i-table tempted_counts_CBP_clr.qza --m-sample-metadata-file tempted_meta_CBP.tsv --p-individual-id-column 'host_subject_id' --p-state-column 'timepoint' --output-dir ./gemelli_CBP_noSVD/ --p-n-components 7 --p-no-svd-centralized
Plugin error from gemelli:

  'build_sparse' object has no attribute 'individual_id_tables_centralized'

Debug info has been saved to /tmp/qiime2-q2cli-err-s96srjt6.log

Content of the above mentioned log file is

(qiime2-amplicon-2023.9) rs500-bcf-01 x86_64 ~/MicrobiomeAnalyses/Projects/Pandyra_CBP_Mb1-Cre>cat /tmp/qiime2-q2cli-err-s96srjt6.log
Traceback (most recent call last):
  File "/homes/sjanssen/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2cli/commands.py", line 520, in __call__
    results = self._execute_action(
  File "/homes/sjanssen/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2cli/commands.py", line 581, in _execute_action
    results = action(**arguments)
  File "<decorator-gen-37>", line 2, in tempted_factorize
  File "/homes/sjanssen/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/qiime2/sdk/action.py", line 342, in bound_callable
    outputs = self._callable_executor_(
  File "/homes/sjanssen/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/qiime2/sdk/action.py", line 566, in _callable_executor_
    output_views = self._callable(**view_args)
  File "/homes/sjanssen/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/gemelli/tempted.py", line 262, in tempted_factorize
    res_ = tempted(table,
  File "/homes/sjanssen/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/gemelli/tempted.py", line 483, in tempted
    tempted_res = tempted_helper(tensor.individual_id_tables_centralized,
AttributeError: 'build_sparse' object has no attribute 'individual_id_tables_centralized'

Is this a bug, or do I somehow provide wrong input?

cameronmartino commented 4 months ago

Hi @sjanssen2,

That is a bug. Thank you for reporting! Will try to get it fixed ASAP.

Thanks!

Cameron

cameronmartino commented 3 weeks ago

Hi @sjanssen2,

This is now fixed in the latest version (v. 0.0.11) let me know if you run into any further issues. Thank you for reporting and using Gemelli!!

Cheers,

Cameron