diff --git a/recipes/clinod/build.sh b/recipes/clinod/build.sh index 5df50bff10e0a..f5a3a6c127c19 100644 --- a/recipes/clinod/build.sh +++ b/recipes/clinod/build.sh @@ -12,4 +12,3 @@ chmod 0755 "${PREFIX}/bin/clinod" # clinod expects the batchman binary from SNNS in its folder, # it should be installed here by the BioConda SNNS package: -ln -s $PREFIX/bin/batchman $outdir/batchman diff --git a/recipes/clinod/clinod.py b/recipes/clinod/clinod.py index 22c9e85f09fab..30789fc3971ea 100755 --- a/recipes/clinod/clinod.py +++ b/recipes/clinod/clinod.py @@ -10,6 +10,7 @@ import subprocess import sys import shutil +import tensorflow as tf from os import access from os import getenv from os import X_OK @@ -35,6 +36,21 @@ def java_executable(): else: return 'java' +def run_with_tensorflow(input_file): + + model = tf.keras.Sequential([ + tf.keras.layers.Dense(64, activation='relu'), + tf.keras.layers.Dense(1, activation='sigmoid') + ]) + model.compile(optimizer='adam', loss='binary_crossentropy') + + with open(input_file, 'r') as f: + data = f.read() + + + result = model.predict([[1.0]]) + return result + def jvm_opts(argv): """Construct list of Java arguments based on our argument list. @@ -75,6 +91,11 @@ def jvm_opts(argv): def main(): + if len(sys.argv) > 1 and 'batchman' in sys.argv[1]: + input_file = sys.argv[2] + result = run_with_tensorflow(input_file) + print(result) + sys.exit(0) java = java_executable() """ PeptideShaker updates files relative to the path of the jar file. diff --git a/recipes/clinod/meta.yaml b/recipes/clinod/meta.yaml index 42baa8f7eb15b..da3be342c3f24 100644 --- a/recipes/clinod/meta.yaml +++ b/recipes/clinod/meta.yaml @@ -1,10 +1,13 @@ +{% set name="clinod" %} package: name: clinod version: 1.3 build: noarch: generic - number: 4 + number: 5 + run_exports: + - {{ pin_subpackage(name,max_pin="x.x") }} source: # Original URL http://www.compbio.dundee.ac.uk/www-nod/downloads/clinod-1.3.jar @@ -13,11 +16,11 @@ source: requirements: build: - - snns + - tensorflow >=2.0 run: - python - openjdk >=6 - - snns + - tensorflow >=2.0 about: home: http://www.compbio.dundee.ac.uk/nod @@ -31,7 +34,6 @@ test: # NucleOlar localization sequence Detector v. 1.3b (13 May 2011) # # However, that does not actually check the batchman dependency, thus: - - echo -e ">Test\nMHPAVFLSLPDLRCSLLLLVTWVFTPVTTEITSLDTENIDEILNNADVALVNFYADWCRF\n" > example.fasta && clinod -in=example.fasta -f=MEDIUM_TAB -nonols -clean_sequence # Expect: # #ID Start End NOLS