diff --git a/PanDDA/README.md b/PanDDA/README.md new file mode 100644 index 0000000..a947c16 --- /dev/null +++ b/PanDDA/README.md @@ -0,0 +1,22 @@ +# PanDDA + +Pan-Dataset Density Analysis (`panddas` from PyPI) for fragment-screening MX data. + + +Installed with ccp4/9.0's `ccp4-python -m pip`, but into this module's own prefix +(`--prefix` + `--ignore-installed`) so the shared ccp4/9.0 install is never modified. +The vendor's "uninstall bundled panddas / upgrade pip+numpy inside ccp4" steps are +replaced by the modulefile's PYTHONPATH prepend, which shadows ccp4's bundled copy. +ccp4/9.0 is both build- and runtime dependency (auto-loaded). + +Build on Ra: see repo README / new-module recipe (`modbuild build 0.2.14`). + +Verify after load: + +```bash +ccp4-python -c 'import pandda; print(pandda.__file__)' # must point into /opt/psi/MX/PanDDA +pandda.analyse -h +``` + +Note: panddas 0.2.14 (2018) predates CCP4 9's Python 3.9; if it fails with py2 +syntax errors at runtime, the tool needs the CCP4 7-era python or PanDDA2 instead. diff --git a/PanDDA/build b/PanDDA/build new file mode 100644 index 0000000..547fe2f --- /dev/null +++ b/PanDDA/build @@ -0,0 +1,36 @@ +#!/usr/bin/env modbuild + +pbuild::prep() { + : +} + +pbuild::configure() { + : +} + +pbuild::compile() { + : +} + +pbuild::install() { + # ccp4/9.0 is a build_requires, so ccp4-python is on PATH here. + command -v ccp4-python >/dev/null || \ + std::die 42 "PanDDA: ccp4-python not on PATH — ccp4/9.0 module did not load" + + # Vendor doc says: uninstall bundled panddas, upgrade pip+numpy, pip install + # panddas — all of which would mutate the shared ccp4/9.0 module. Instead: + # --prefix keeps everything inside this module, --ignore-installed pulls + # fresh deps (incl. numpy) here rather than reusing/soiling ccp4's, and the + # modulefile's PYTHONPATH prepend shadows the ccp4-bundled panddas. + ccp4-python -m pip install --prefix="${PREFIX}" --ignore-installed \ + "panddas==${V_PKG}" || \ + std::die 42 "PanDDA: pip install failed — check network and ccp4-python version" + + # stable alias so the modulefile needn't know ccp4's python X.Y + local -a sp=( "${PREFIX}"/lib/python*/site-packages ) + [[ -d "${sp[0]}" ]] || std::die 42 "PanDDA: no site-packages under ${PREFIX}/lib" + ln -sfn "${sp[0]#"${PREFIX}"/}" "${PREFIX}/site-packages" + + [[ -x "${PREFIX}/bin/pandda.analyse" ]] || \ + std::die 42 "PanDDA: bin/pandda.analyse missing — install incomplete" +} diff --git a/PanDDA/files/config.yaml b/PanDDA/files/config.yaml new file mode 100644 index 0000000..a37fd63 --- /dev/null +++ b/PanDDA/files/config.yaml @@ -0,0 +1,14 @@ +--- +format: 1 +PanDDA: + defaults: + group: MX + overlay: base + relstage: unstable + # no urls/shasums — pip fetches panddas== from PyPI + versions: + 0.2.14: + config: + relstage: unstable + build_requires: [ccp4/9.0] + runtime_deps: [ccp4/9.0] diff --git a/PanDDA/modulefile b/PanDDA/modulefile new file mode 100644 index 0000000..ccf3673 --- /dev/null +++ b/PanDDA/modulefile @@ -0,0 +1,16 @@ +#%Module1.0 + +module-whatis "PanDDA: multi-dataset crystallographic analysis for fragment screening" +module-url "https://pandda.bitbucket.io" +module-license "CC BY-SA 4.0" +module-maintainer "Jiaxin Duan " + +module-help " +PanDDA (panddas) installed into its own prefix with ccp4/9.0's ccp4-python. +ccp4/9.0 is auto-loaded as a runtime dependency; the PYTHONPATH prepend below +shadows the panddas copy bundled inside ccp4. +Main entry point: pandda.analyse +" + +prepend-path PATH $PREFIX/bin +prepend-path PYTHONPATH $PREFIX/site-packages