diff --git a/recipes/dssp/build.sh b/recipes/dssp/build.sh new file mode 100644 index 0000000000000..d774cf96670be --- /dev/null +++ b/recipes/dssp/build.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +set -e + +# Link dynamically +sed -i -e 's/\-static //' makefile + +echo "DEST_DIR=${PREFIX}" > make.config +echo "MAN_DIR=${PREFIX}/share/man/man1" >> make.config + +echo "BOOST_INC_DIR=${BUILD_PREFIX}/include" >> make.config +echo "BOOST_LIB_DIR=${BUILD_PREFIX}/lib" >> make.config +# Use conda-provided cxx +sed -i -e 's/^CXX/#CXX/' makefile + +# clang++ won't find std::tuple unless in C++11 mode; +# don't compile with anything newer than C++11 since we use the removed +# std::unary_function +if [ `uname -s` = "Darwin" ]; then + CFLAGS="-std=c++11 -Wno-enum-constexpr-conversion ${CFLAGS}" +fi + +make -j${CPU_COUNT} install diff --git a/recipes/dssp/dssp-boost-tr1.patch b/recipes/dssp/dssp-boost-tr1.patch new file mode 100644 index 0000000000000..c924366dd79bc --- /dev/null +++ b/recipes/dssp/dssp-boost-tr1.patch @@ -0,0 +1,87 @@ +diff -Nur dssp-3.0.0/src/dssp.cpp dssp-3.0.0-patched/src/dssp.cpp +--- dssp-3.0.0/src/dssp.cpp 2017-09-21 02:42:09.000000000 -0700 ++++ dssp-3.0.0-patched/src/dssp.cpp 2018-04-25 11:05:47.499486529 -0700 +@@ -73,7 +73,7 @@ + + double alpha; + char chirality; +- std::tr1::tie(alpha,chirality) = residue.Alpha(); ++ std::tie(alpha,chirality) = residue.Alpha(); + + uint32 bp[2] = {}; + char bridgelabel[2] = { ' ', ' ' }; +diff -Nur dssp-3.0.0/src/primitives-3d.cpp dssp-3.0.0-patched/src/primitives-3d.cpp +--- dssp-3.0.0/src/primitives-3d.cpp 2017-09-21 02:42:09.000000000 -0700 ++++ dssp-3.0.0-patched/src/primitives-3d.cpp 2018-04-25 11:05:54.642577464 -0700 +@@ -152,7 +152,7 @@ + + // -------------------------------------------------------------------- + +-std::tr1::tuple QuaternionToAngleAxis(MQuaternion q) ++std::tuple QuaternionToAngleAxis(MQuaternion q) + { + if (q.R_component_1() > 1) + q = Normalize(q); +@@ -168,7 +168,7 @@ + + MPoint axis(q.R_component_2() / s, q.R_component_3() / s, q.R_component_4() / s); + +- return std::tr1::make_tuple(angle, axis); ++ return std::make_tuple(angle, axis); + } + + MPoint CenterPoints(std::vector& points) +diff -Nur dssp-3.0.0/src/primitives-3d.h dssp-3.0.0-patched/src/primitives-3d.h +--- dssp-3.0.0/src/primitives-3d.h 2017-09-21 02:42:09.000000000 -0700 ++++ dssp-3.0.0-patched/src/primitives-3d.h 2018-04-25 11:05:18.542117901 -0700 +@@ -12,7 +12,7 @@ + #pragma once + + #include +-#include ++#include + + #include + +@@ -71,7 +71,7 @@ + + MQuaternion Normalize(MQuaternion q); + +-std::tr1::tuple QuaternionToAngleAxis(MQuaternion q); ++std::tuple QuaternionToAngleAxis(MQuaternion q); + MPoint Centroid(std::vector& points); + MPoint CenterPoints(std::vector& points); + MQuaternion AlignPoints(const std::vector& a, +diff -Nur dssp-3.0.0/src/structure.cpp dssp-3.0.0-patched/src/structure.cpp +--- dssp-3.0.0/src/structure.cpp 2017-09-21 02:42:09.000000000 -0700 ++++ dssp-3.0.0-patched/src/structure.cpp 2018-04-25 11:05:41.581411192 -0700 +@@ -554,7 +554,7 @@ + return result; + } + +-std::tr1::tuple MResidue::Alpha() const ++std::tuple MResidue::Alpha() const + { + double alhpa = 360; + char chirality = ' '; +@@ -571,7 +571,7 @@ + else + chirality = '+'; + } +- return std::tr1::make_tuple(alhpa, chirality); ++ return std::make_tuple(alhpa, chirality); + } + + double MResidue::Kappa() const +diff -Nur dssp-3.0.0/src/structure.h dssp-3.0.0-patched/src/structure.h +--- dssp-3.0.0/src/structure.h 2017-09-21 02:42:09.000000000 -0700 ++++ dssp-3.0.0-patched/src/structure.h 2018-04-25 11:05:03.233921919 -0700 +@@ -171,7 +171,7 @@ + + double Phi() const; + double Psi() const; +- std::tr1::tuple ++ std::tuple + Alpha() const; + double Kappa() const; + double TCO() const; diff --git a/recipes/dssp/meta.yaml b/recipes/dssp/meta.yaml new file mode 100644 index 0000000000000..527a024ebe133 --- /dev/null +++ b/recipes/dssp/meta.yaml @@ -0,0 +1,52 @@ +{% set version = "3.0.0" %} +{% set name = "dssp" %} +# This file, the patch file and build file were taken from conda salilab channel's recipes - please see https://github.com/salilab/conda-recipes for more. +package: + name: {{ name }} + version: {{ version }} + +source: + url: https://salilab.org/dssp/dssp-{{ version }}.tgz + sha256: 25d39a2107767b622a59dd9fa790112c1516564b8518fc6ac0fab081d5ac3ab0 + patches: + - dssp-boost-tr1.patch #Rebuild with latest gcc and boost - this was taken from the + +build: + number: 0 + run_exports: + - {{ pin_subpackage('dssp', max_pin="x.x") }} + +requirements: + build: + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - boost-cpp + - zlib + - bzip2 + - make + run: + - {{ pin_compatible('boost-cpp') }} + +about: + home: http://swift.cmbi.ru.nl/gv/dssp/ + summary: 'Secondary structure assignment' + license: Boost + description: > + The DSSP program was designed by Wolfgang Kabsch and Chris Sander to + standardize secondary structure assignment. DSSP is a database of secondary + structure assignments (and much more) for all protein entries in the Protein + Data Bank (PDB). DSSP is also the program that calculates DSSP entries from + PDB entries. DSSP does not predict secondary structure. + + Note that this is a very old version of DSSP, which we have used in the + past. It is kept here in the hope that others may find it useful - but + it may not work on newer systems (e.g. Apple Silicon Macs). We recommend + using the most recent version of DSSP instead. + See [the DSSP website](http://swift.cmbi.ru.nl/gv/dssp/) for more details. + + If you have problems with this conda package, please + [open an issue](https://github.com/salilab/conda-recipes/issues). + +test: + commands: + - mkdssp --version diff --git a/recipes/tamper/build.sh b/recipes/tamper/build.sh new file mode 100755 index 0000000000000..7cd4ed88cc919 --- /dev/null +++ b/recipes/tamper/build.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +mkdir -p ${PREFIX}/bin/ +mkdir -p ${PREFIX}/share/tamper/ +mkdir -p ${PREFIX}/share/tamper/src/ +mkdir -p ${PREFIX}/share/tamper/checkpoints/trained +cp -r src/. ${PREFIX}/share/tamper/src/ +cp -r checkpoints/trained/. ${PREFIX}/share/tamper/checkpoints/trained +ls ${PREFIX}/share/tamper/src/ + +#This allows src code to be executbale for user and group +chmod -R u+x ${PREFIX}/share/tamper/src/ +chmod -R g+x ${PREFIX}/share/tamper/src/ + +ls -lah ${PREFIX}/share/tamper/src/ + +#Adding python executable for the script to work +echo "#!/bin/bash" > ${PREFIX}/bin/predict_tAMPer +echo "python ${PREFIX}/share/tamper/src/predict_tAMPer.py \"\$@\"" >> ${PREFIX}/bin/predict_tAMPer + +echo "#!/bin/bash" > ${PREFIX}/bin/train_tAMPer.py +echo "python ${PREFIX}/share/tamper/src/train_tAMPer.py \"\$@\"" >> ${PREFIX}/bin/train_tAMPer + +#Checking if files are copied within bin +echo "Files in ${PREFIX}/bin/:" +ls -l ${PREFIX}/bin/ + +chmod +x ${PREFIX}/bin/predict_tAMPer +chmod +x ${PREFIX}/bin/train_tAMPer + +#Verify permissions +echo "Permissions after chmod:" +ls -l ${PREFIX}/share/tamper/src/ + diff --git a/recipes/tamper/meta.yaml b/recipes/tamper/meta.yaml new file mode 100644 index 0000000000000..46966f2d5f401 --- /dev/null +++ b/recipes/tamper/meta.yaml @@ -0,0 +1,43 @@ +{% set name = "tamper" %} +{% set version = "1.0.1" %} + +package: + name: '{{ name|lower }}' + version: '{{ version }}' + +source: + url: https://github.com/bcgsc/tAMPer/releases/download/v{{ version }}/tAMPer_v{{ version }}.tar.gz + sha256: 0c4cfc57a844b89dbc9c020084b5d12b096359a7341350552f5ea707d882486a + +build: + number: 1 + noarch: generic + run_exports: + - {{ pin_subpackage(name, max_pin='x.x') }} + +requirements: + host: + - python >=3.9 + run: + - biopython + - dssp + - fair-esm>=2.0.0 + - loguru + - pandas + - python>=3.9 + - pytorch + - pytorch_cluster + - pytorch_geometric + - torch-scatter + +test: + commands: + - train_tAMPer -h + - predict_tAMPer -h + +about: + home: https://github.com/bcgsc/tAMPer + license: GPL-3 + license_family: GPL + license_file: LICENSE + summary: Structure-aware deep learning model for peptides toxicity prediction