AlexsLemonade / scpca-downstream-analyses

This repository is intended to store our pipeline for marker genes analysis.
0 stars 0 forks source link

374 Update packages to fix error when building conda environment #377

Closed jashapiro closed 1 year ago

jashapiro commented 1 year ago

stacked on #376

closes #374

Here I cleaned up package installation to work when the CRAN mirror is not set by adding a repos argument to remotes::install_version(), which was causing at least some of the errors seen in #374.

I also removed the "on-the-fly" installation of gt, as we can install that through conda/renv just fine, and that installation was already part of #376.

Finally, I moved some package loading calls to after the setup_renv calls to prevent potential errors with incorrect versions of packages being loaded (or not set if renv installation was used.

Same caveats apply here as in #376: This all seems to work for me, but I am not representative of all users!

I tested this by running

snakemake --use-conda -s integration.snakefile -c4

Which ran without incident both locally and on the server.

jashapiro commented 1 year ago

I also moved harmony installation to within the environment setup, which seemed to be causing me trouble, until I remembered something long past about a conda package, conda-ecosystem-user-package-isolation, that isolates user libraries: I have now added that to the conda repo, and it seems to have solved the issues I was seeing. Maybe it will help others too and make things more reliable! 🤞🏼

sjspielman commented 1 year ago

Also wanted to say A+ for conda-ecosystem-user-package-isolation!