quadram-institute-bioscience / dadaist2

Dadaist2 🟨 Highway to R
https://quadram-institute-bioscience.github.io/dadaist2/
MIT License
13 stars 5 forks source link

FATAL ERROR after mamba installation #22

Open jzrapp opened 2 months ago

jzrapp commented 2 months ago

Hi,

I'm trying to run dadaist2 on macOS 14.5, but unfortunately I am unable to replicate the tutorial. I installed dadaist2 using: mamba create -n dadaist -c conda-forge -c bioconda dadaist2 When I run dadaist2 -i data/16S/ -o example-output -d refs/SILVA_SSU_r138_2019.RData -t 2 -m metadata.tsv --verbose, I receive this output:

`[2024-07-02 16:54:14] Ready to log in /Users/jzrapp/example-output/dadaist.log [2024-07-02 16:54:14] dadaist2 1.3.0 [2024-07-02 16:54:14] DECIPHER Taxonomy database found: refs/SILVA_SSU_r138_2019.RData Use of uninitialized value in concatenation (.) or string at /Users/jzrapp/miniconda/envs/dadaist2/bin/dadaist2 line 535. [2024-07-02 16:54:14] Parameter: taxonomy-type: [2024-07-02 16:54:14] Parameter: taxonomy-db: skip

I thought there was an issue with DECIPHER, so I also tried running it with a different database dadaist2 -i data/16S/ -o example-output -d refs/silva_nr_v138_train_set.fa.gz -t 2 -m metadata.tsv --verbose

` [2024-07-02 16:54:28] Ready to log in /Users/jzrapp/example-output/dadaist.log [2024-07-02 16:54:28] dadaist2 1.3.0 [2024-07-02 16:54:28] Taxonomy database found: refs/silva_nr_v138_train_set.fa.gz [2024-07-02 16:54:28] Parameter: taxonomy-type: dada2 [2024-07-02 16:54:28] Parameter: taxonomy-db: refs/silva_nr_v138_train_set.fa.gz

I am not sure what the problem is. I thought maybe some dependencies were not installed correctly, so I also tried to install dadaist2 via mamba env create --file dadaist2-1.2.5-Darwin.yaml -n dadaist2 but it failed and gave a very long list of reasons, which mostly said conflicts with any installable versions previously reported.

Do you have any idea what the issue might be, @telatin? Thanks a lot!

jzrapp commented 2 months ago

Hi, I think I found the issue and have also found a semi-permanent solution.

The issue arises from R .libPaths() that conflicts with user/system installed R. So even when creating a separate env for the mamba/conda installation, the .libPaths() defaults to my system installation and cannot locate all libraries. The issue is described here in detail: https://github.com/conda-forge/r-base-feedstock/issues/37 https://github.com/picrust/picrust2/issues/139

For now, I ended up changing my .Rprofile file and added .libPaths('/Users/jzrapp/miniconda/envs/dadaist/lib/R/library') and then used .libPaths( c(.libPaths()[2], .libPaths()[1]) )

to specify the order in which the libraries should be used. I am now able to run the tutorial without issues, but I think it would be nice to have a more elegant solution... :)

telatin commented 2 months ago

Thanks for reporting! I never had this issue on my setups but I'm not an expert R user. I'll try to mention this in the tutorial!