From 9f0367d67556f6faa0efcbb63d3899aac7dabc41 Mon Sep 17 00:00:00 2001 From: berkeucar Date: Fri, 13 Sep 2024 23:00:05 -0700 Subject: [PATCH 01/13] Added DSSP package --- recipes/dssp/build.sh | 23 ++++++++ recipes/dssp/dssp-boost-tr1.patch | 87 +++++++++++++++++++++++++++++++ recipes/dssp/meta.yaml | 50 ++++++++++++++++++ 3 files changed, 160 insertions(+) create mode 100644 recipes/dssp/build.sh create mode 100644 recipes/dssp/dssp-boost-tr1.patch create mode 100644 recipes/dssp/meta.yaml diff --git a/recipes/dssp/build.sh b/recipes/dssp/build.sh new file mode 100644 index 0000000000000..2316905bb2de1 --- /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 -j4 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..9c21821218f60 --- /dev/null +++ b/recipes/dssp/meta.yaml @@ -0,0 +1,50 @@ +# 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: dssp + version: "3.0.0" + +source: + fn: dssp-3.0.0.tgz +# url: ftp://ftp.cmbi.ru.nl/pub/software/dssp/dssp-3.0.0.tgz +# Original site appears to be down - use our mirror: + url: https://salilab.org/dssp/dssp-3.0.0.tgz + sha256: 25d39a2107767b622a59dd9fa790112c1516564b8518fc6ac0fab081d5ac3ab0 + patches: + - dssp-boost-tr1.patch #Rebuild with latest gcc and boost - this was taken from the + +build: + number: 1 + +requirements: + build: + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - boost-cpp + - zlib + - bzip2 + 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 From 159ae822499cbce719062780dec14728688ef199 Mon Sep 17 00:00:00 2001 From: berkeucar Date: Fri, 13 Sep 2024 23:26:55 -0700 Subject: [PATCH 02/13] added run_exports section --- recipes/dssp/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/dssp/meta.yaml b/recipes/dssp/meta.yaml index 9c21821218f60..91d6884f1def1 100644 --- a/recipes/dssp/meta.yaml +++ b/recipes/dssp/meta.yaml @@ -24,6 +24,8 @@ requirements: - bzip2 run: - {{ pin_compatible('boost-cpp') }} + run_exports: + - {{ pin_subpackage('DSSP', max_pin="x.x") }} about: home: http://swift.cmbi.ru.nl/gv/dssp/ From 3c942a0922e114b5497983721711fe7a4978de22 Mon Sep 17 00:00:00 2001 From: berkeucar Date: Fri, 13 Sep 2024 23:34:09 -0700 Subject: [PATCH 03/13] fixed run_exports section --- recipes/dssp/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/dssp/meta.yaml b/recipes/dssp/meta.yaml index 91d6884f1def1..1f5140a294585 100644 --- a/recipes/dssp/meta.yaml +++ b/recipes/dssp/meta.yaml @@ -14,6 +14,8 @@ source: build: number: 1 + run_exports: + - {{ pin_subpackage('DSSP', max_pin="x.x") }} requirements: build: @@ -24,8 +26,6 @@ requirements: - bzip2 run: - {{ pin_compatible('boost-cpp') }} - run_exports: - - {{ pin_subpackage('DSSP', max_pin="x.x") }} about: home: http://swift.cmbi.ru.nl/gv/dssp/ From 866be995d23738520a6dd84fcfb655dd4dd3290d Mon Sep 17 00:00:00 2001 From: berkeucar Date: Fri, 13 Sep 2024 23:41:13 -0700 Subject: [PATCH 04/13] fixed the build number --- recipes/dssp/meta.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes/dssp/meta.yaml b/recipes/dssp/meta.yaml index 1f5140a294585..db038121454da 100644 --- a/recipes/dssp/meta.yaml +++ b/recipes/dssp/meta.yaml @@ -1,10 +1,11 @@ +{% set version = "3.0.0" %} # 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: dssp - version: "3.0.0" + version: {{ version }} source: - fn: dssp-3.0.0.tgz + fn: dssp-{{ version }}.tgz # url: ftp://ftp.cmbi.ru.nl/pub/software/dssp/dssp-3.0.0.tgz # Original site appears to be down - use our mirror: url: https://salilab.org/dssp/dssp-3.0.0.tgz @@ -13,7 +14,7 @@ source: - dssp-boost-tr1.patch #Rebuild with latest gcc and boost - this was taken from the build: - number: 1 + number: 0 run_exports: - {{ pin_subpackage('DSSP', max_pin="x.x") }} From 30e0d066c4af06b35221128f4194698d424d1be4 Mon Sep 17 00:00:00 2001 From: berkeucar Date: Fri, 13 Sep 2024 23:49:53 -0700 Subject: [PATCH 05/13] removed fn section --- recipes/dssp/meta.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/recipes/dssp/meta.yaml b/recipes/dssp/meta.yaml index db038121454da..1717a56c2000c 100644 --- a/recipes/dssp/meta.yaml +++ b/recipes/dssp/meta.yaml @@ -5,9 +5,6 @@ package: version: {{ version }} source: - fn: dssp-{{ version }}.tgz -# url: ftp://ftp.cmbi.ru.nl/pub/software/dssp/dssp-3.0.0.tgz -# Original site appears to be down - use our mirror: url: https://salilab.org/dssp/dssp-3.0.0.tgz sha256: 25d39a2107767b622a59dd9fa790112c1516564b8518fc6ac0fab081d5ac3ab0 patches: From d93fd923d2f12ac5c4d2192b66b1bd607ff3a8c5 Mon Sep 17 00:00:00 2001 From: berkeucar Date: Sat, 14 Sep 2024 00:05:16 -0700 Subject: [PATCH 06/13] fixed pin_subpackages section --- recipes/dssp/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/dssp/meta.yaml b/recipes/dssp/meta.yaml index 1717a56c2000c..5ac472fe91748 100644 --- a/recipes/dssp/meta.yaml +++ b/recipes/dssp/meta.yaml @@ -13,7 +13,7 @@ source: build: number: 0 run_exports: - - {{ pin_subpackage('DSSP', max_pin="x.x") }} + - {{ pin_subpackage('dssp', max_pin="x.x") }} requirements: build: From 8125ca07d60b58452b88eb34f09ff65d81820758 Mon Sep 17 00:00:00 2001 From: berkeucar Date: Sat, 14 Sep 2024 10:57:48 -0700 Subject: [PATCH 07/13] added make to the meta.yml --- recipes/dssp/meta.yaml | 1 + recipes/tamper/build.sh | 33 ++++++++++++++++++++++++++++ recipes/tamper/meta.yaml | 47 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 81 insertions(+) create mode 100644 recipes/tamper/build.sh create mode 100644 recipes/tamper/meta.yaml diff --git a/recipes/dssp/meta.yaml b/recipes/dssp/meta.yaml index 5ac472fe91748..ec9d72728cf70 100644 --- a/recipes/dssp/meta.yaml +++ b/recipes/dssp/meta.yaml @@ -22,6 +22,7 @@ requirements: - boost-cpp - zlib - bzip2 + - make run: - {{ pin_compatible('boost-cpp') }} diff --git a/recipes/tamper/build.sh b/recipes/tamper/build.sh new file mode 100644 index 0000000000000..0c87f849ba1e0 --- /dev/null +++ b/recipes/tamper/build.sh @@ -0,0 +1,33 @@ +#!/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..115cc7d22b98f --- /dev/null +++ b/recipes/tamper/meta.yaml @@ -0,0 +1,47 @@ +{% 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=1.79 + - fair-esm=2.0.0 + - libboost=1.73.0 + - loguru=0.7.0 + - matplotlib=3.8.4 + - numpy=1.24.3 + - pandas=1.5.3 + - pytorch=1.13.1 + - pytorch_cluster=1.6.1 + - pytorch_geometric=2.3.0 + - torch-scatter=2.1.1 + - transformers=4.41.2 + - scikit-learn=1.2.2 + - scipy=1.10.1 + +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 \ No newline at end of file From 045e865e488f347f64d06c14db4341590209ba42 Mon Sep 17 00:00:00 2001 From: berkeucar Date: Thu, 19 Sep 2024 11:23:19 -0700 Subject: [PATCH 08/13] made name consistent with the version --- recipes/dssp/meta.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/dssp/meta.yaml b/recipes/dssp/meta.yaml index ec9d72728cf70..58841bd18016d 100644 --- a/recipes/dssp/meta.yaml +++ b/recipes/dssp/meta.yaml @@ -1,7 +1,8 @@ {% 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: dssp + name: {{ name }} version: {{ version }} source: From da6359cccce66e5c7324de0edec14067eb8cba73 Mon Sep 17 00:00:00 2001 From: berkeucar Date: Thu, 19 Sep 2024 11:34:18 -0700 Subject: [PATCH 09/13] deleted tamper --- recipes/tamper/build.sh | 33 ---------------------------- recipes/tamper/meta.yaml | 47 ---------------------------------------- 2 files changed, 80 deletions(-) delete mode 100644 recipes/tamper/build.sh delete mode 100644 recipes/tamper/meta.yaml diff --git a/recipes/tamper/build.sh b/recipes/tamper/build.sh deleted file mode 100644 index 0c87f849ba1e0..0000000000000 --- a/recipes/tamper/build.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/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 deleted file mode 100644 index 115cc7d22b98f..0000000000000 --- a/recipes/tamper/meta.yaml +++ /dev/null @@ -1,47 +0,0 @@ -{% 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=1.79 - - fair-esm=2.0.0 - - libboost=1.73.0 - - loguru=0.7.0 - - matplotlib=3.8.4 - - numpy=1.24.3 - - pandas=1.5.3 - - pytorch=1.13.1 - - pytorch_cluster=1.6.1 - - pytorch_geometric=2.3.0 - - torch-scatter=2.1.1 - - transformers=4.41.2 - - scikit-learn=1.2.2 - - scipy=1.10.1 - -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 \ No newline at end of file From 7063601832737f07c6a014680fc6bc31bd391aae Mon Sep 17 00:00:00 2001 From: berkeucar Date: Thu, 19 Sep 2024 12:00:29 -0700 Subject: [PATCH 10/13] fixed the mistake for the dssp name --- recipes/dssp/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/dssp/meta.yaml b/recipes/dssp/meta.yaml index 58841bd18016d..36d27564196c3 100644 --- a/recipes/dssp/meta.yaml +++ b/recipes/dssp/meta.yaml @@ -1,5 +1,5 @@ {% set version = "3.0.0" %} -{% set name = "dssp"} +{% 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 }} From ceca771fdcb71f494a16eac67936058c8d6d7647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Berke=20U=C3=A7ar?= <63494583+berkeucar@users.noreply.github.com> Date: Fri, 20 Sep 2024 10:05:20 -0700 Subject: [PATCH 11/13] Update recipes/dssp/build.sh Co-authored-by: Martin Grigorov --- recipes/dssp/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/dssp/build.sh b/recipes/dssp/build.sh index 2316905bb2de1..d774cf96670be 100644 --- a/recipes/dssp/build.sh +++ b/recipes/dssp/build.sh @@ -20,4 +20,4 @@ if [ `uname -s` = "Darwin" ]; then CFLAGS="-std=c++11 -Wno-enum-constexpr-conversion ${CFLAGS}" fi -make -j4 install +make -j${CPU_COUNT} install From b924d1b19dd9dc11ffc346f9eb56c8f6dc449568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Berke=20U=C3=A7ar?= <63494583+berkeucar@users.noreply.github.com> Date: Fri, 20 Sep 2024 10:05:26 -0700 Subject: [PATCH 12/13] Update recipes/dssp/meta.yaml Co-authored-by: Martin Grigorov --- recipes/dssp/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/dssp/meta.yaml b/recipes/dssp/meta.yaml index 36d27564196c3..527a024ebe133 100644 --- a/recipes/dssp/meta.yaml +++ b/recipes/dssp/meta.yaml @@ -6,7 +6,7 @@ package: version: {{ version }} source: - url: https://salilab.org/dssp/dssp-3.0.0.tgz + 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 From c81df5da55f20128536291b803d44842ea151e7d Mon Sep 17 00:00:00 2001 From: berkeucar Date: Wed, 6 Nov 2024 17:04:29 -0800 Subject: [PATCH 13/13] added tamper --- recipes/tamper/build.sh | 34 +++++++++++++++++++++++++++++++ recipes/tamper/meta.yaml | 43 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100755 recipes/tamper/build.sh create mode 100644 recipes/tamper/meta.yaml 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