Adonis Plugin Unable to Load Lattice

I have the following error when running qiime diversity adonis:

R version 4.2.1 (2022-06-23)
Loading required package: permute
Loading required package: lattice
Error: package or namespace load failed for ‘lattice’ in library.dynam(lib, package, package.lib):
shared object ‘lattice.so’ not found
Error: package ‘lattice’ could not be loaded
Execution halted

Here is my code:

!qiime diversity adonis \
        --i-distance-matrix diversity-results-dn/jaccard_distance_matrix.qza \
        --m-metadata-file 'ELFK_Master_Data_brief.txt' \
        --p-formula "CORT + BEHAV_AGE" \
        --o-visualization jaccard_adonis.qzv \

I am using qiime2-2021.11. I would really appreciate help understanding what this error means/how to fix it; thank you!

Hi @naomig,

Thanks for reaching out! :nerd_face:

This is the source of the error - the lattice.so dependency wasn't found when running qiime diversity adonis. My first suspicion is that this may be due to the version of QIIME 2 that you're using (2021.11) - can you please try installing the latest version of QIIME 2 and re-running this command to see if that resolves the issue? Install guide can be found below:

https://docs.qiime2.org/2022.2/install/native/#install-qiime-2-within-a-conda-environment

Hope this helps! Cheers :lizard:

Thank you! The issue persists even with the updated version of Qiime2. However, I am successfully running Adonis in R.

Hi @naomig,

Thanks for providing those details! I am wondering if there may be competing package installations related to your R installation. Can you try uninstalling R on your machine, removing your existing QIIME 2 environments, and re-installing the latest version of QIIME 2 once more? I suspect once you've installed QIIME 2 from a 'clean slate' so to speak, you should have all of the packages that you need.

Here are instructions on how to remove existing conda environments from your machine, for your reference:

https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#removing-an-environment

Hope this helps! Cheers :lizard:

resolved, thank you!

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.