From 86ecf88a8d610760ef241984b4f72c6738fe3368 Mon Sep 17 00:00:00 2001 From: Benjamin Barad Date: Fri, 6 Jan 2023 14:53:54 -0800 Subject: [PATCH] Installation guide and updated pip requirements --- Install.md | 66 ++++++++++++++++++++++++++++++++++++++++++++ README.md | 4 ++- pip_requirements.txt | 4 +-- 3 files changed, 71 insertions(+), 3 deletions(-) create mode 100644 Install.md diff --git a/Install.md b/Install.md new file mode 100644 index 0000000..4bc60b7 --- /dev/null +++ b/Install.md @@ -0,0 +1,66 @@ +# Installation Tips +Installing the morphometrics pipeline is usually relatively easy, but there are a few edge cases that require special attention. + +## M1 Macs +**Thanks to Genevieve Buckley for this solution: (https://github.com/GrotjahnLab/surface_morphometrics/issues/8)** +This is a temporary workaround and needs additional testing! + +0. Build the conda environment like normal, but don't pip install pymeshlab - just remove it from the pip_requirements.txt file +1. Install pyqt into your conda environment: +For M1 Macs, the andfoy conda channel has a working pyqt build: +```bash +conda install pyqt -c andfoy +``` + +2. Build pymeshlab +https://github.com/cnr-isti-vclab/PyMeshLab/blob/main/src/README.md + +```bash +brew install libomp cgal xerces-c +git clone --recursive https://github.com/cnr-isti-vclab/PyMeshLab.git +cd PyMeshLab + +# Build pymeshlab +mkdir src/build +cd src/build +cmake .. +make +make install +``` + + +3. Export the `KMP_DUPLICATE_LIB_OK` environment variable +This prevents libomp errors. +You can use conda to permanently set an environment variable in the morphometrics conda environment: +```bash= +conda activate morphometrics +conda env config vars KMP_DUPLICATE_LIB_OK=TRUE + +# Must reactivate conda environment +conda deactivate +conda activate morphometrics +conda env config vars list +# You should now see KMP_DUPLICATE_LIB_OK = TRUE in this list +``` + +4. Check the build worked: +```bash +python -m pip install pytest +python -m pytest --pyargs pymeshlab +``` + +4. Install pymeshlab to the conda environment: +```bash +pip install . +``` + +5. You're ready to go! +Try running the surface-morphometrics scripts on the example data. See the README for more details. + +## Container Implementation +For older linux environments (such as CentOS7) Qt5 will not behave well. A container implementation is in progress (https://github.com/GrotjahnLab/surface_morphometrics/issues/10) \ No newline at end of file diff --git a/README.md b/README.md index b115bc2..931f9b3 100644 --- a/README.md +++ b/README.md @@ -84,8 +84,8 @@ Individual steps are available as click commands in the terminal, and as functio * Files with .log extension are log files, mostly from the output of the pycurv run. * Quantifications (plots and statistical tests) are output in csv, svg, and png formats. - ## Troubleshooting +0. If installation fails, you may want to reference `Install.md` for advanced installation tips (this is especially relevant for M1/M2 macs and Centos7 linux machines) 1. Warnings of the type `Gaussian or Mean curvature of X has a large computation error`... can be ignored, as they get cleaned up by pycurv 2. MRC files that are output by AMIRA don't have proper machine stamps by default. They need to be imported with `mrcfile.open(filename, permissive=True)` @@ -100,6 +100,8 @@ Individual steps are available as click commands in the terminal, and as functio 8. Pycurv 1. Pyto 2. Graph-tool + + ## Citation The development of this toolkit and examples of useful applications can be found in the following manuscript. Please cite it if you use this software in your research, or extend it to make improvements! diff --git a/pip_requirements.txt b/pip_requirements.txt index b419ce6..7ada481 100644 --- a/pip_requirements.txt +++ b/pip_requirements.txt @@ -1,5 +1,5 @@ -git+https://github.com/bbarad/Pyto.git -git+https://github.com/GrotjahnLab/pycurv.git +git+https://github.com/vladanl/Pyto.git +git+https://github.com/kalemaria/pycurv.git pymeshlab pyyaml click