# HG changeset patch # User guerler # Date 1601060834 0 # Node ID 21a7dd67b4838f5bd6c434c53c3cfe49d3d8e954 # Parent 860bd6f8f4802119a77583d83e408d4c8e1c4050 "planemo upload commit f208fb81425711754738fc8e612ee2d5cc26377f" diff -r 860bd6f8f480 -r 21a7dd67b483 spring_minz.py --- a/spring_minz.py Sat Aug 01 04:16:19 2020 -0400 +++ b/spring_minz.py Fri Sep 25 19:07:14 2020 +0000 @@ -41,9 +41,9 @@ interactions.append((name, minz)) print("Predicting: %s, min-Z: %s" % (name, minz)) interactions.sort(key=lambda tup: tup[1], reverse=True) - with open(args.output, 'w') as output_file: + with open(args.output, 'a+') as output_file: for i in interactions: - output_file.write("%s %s\n" % (i[0], i[1])) + output_file.write("%s %s %s\n" % (args.name, i[0], i[1])) def get_template_scores(hhr_file, min_score, identifier_length): result = {} @@ -63,6 +63,7 @@ if __name__ == "__main__": parser = argparse.ArgumentParser(description='This script identifies interactions by detecting matching HH-search results.') parser.add_argument('-t', '--target', help='HHR target file result', required=True) + parser.add_argument('-n', '--name', help='HHR target name', required=True) parser.add_argument('-c', '--crossreference', help='Cross Reference index file', required=True) parser.add_argument('-x', '--idx', help='Length of identifier', type=int, default=6) parser.add_argument('-l', '--list', help='Text file containing identifiers.', required=True) diff -r 860bd6f8f480 -r 21a7dd67b483 spring_minz.xml --- a/spring_minz.xml Sat Aug 01 04:16:19 2020 -0400 +++ b/spring_minz.xml Fri Sep 25 19:07:14 2020 +0000 @@ -7,10 +7,12 @@ link '${str(input)}' 'inputs/${input.element_identifier}' && echo '${input.element_identifier}' >> 'input_list' && #end for - python3 '$__tool_directory__/spring_minz.py' -m '$minscore' -t '$target' -c '$crossreference' -x '$idx' -o '$output' -l input_list -i inputs + #for target in $targets + python3 '$__tool_directory__/spring_minz.py' -m '$minscore' -t '${str(target)}' -n '${target.element_identifier}' -c '$crossreference' -x '$idx' -o '$output' -l input_list -i inputs + #end for ]]> - + @@ -21,7 +23,11 @@ - + + + + + @@ -39,7 +45,11 @@ - + + + + + diff -r 860bd6f8f480 -r 21a7dd67b483 test-data/dbCAN_result.txt --- a/test-data/dbCAN_result.txt Sat Aug 01 04:16:19 2020 -0400 +++ b/test-data/dbCAN_result.txt Fri Sep 25 19:07:14 2020 +0000 @@ -1,3 +1,3 @@ -6W9C_A.hhr 24.2 -6W4H_B.hhr 24.0 -6W37_A.hhr 14.0 +7BQY_A.hhr 6W9C_A.hhr 24.2 +7BQY_A.hhr 6W4H_B.hhr 24.0 +7BQY_A.hhr 6W37_A.hhr 14.0 diff -r 860bd6f8f480 -r 21a7dd67b483 test-data/pdb70_result.txt --- a/test-data/pdb70_result.txt Sat Aug 01 04:16:19 2020 -0400 +++ b/test-data/pdb70_result.txt Fri Sep 25 19:07:14 2020 +0000 @@ -1,2 +1,2 @@ -NP_000282.1.hhr 875.1 -NP_000290.2.hhr 86.5 +NP_000282.1.hhr NP_000282.1.hhr 875.1 +NP_000282.1.hhr NP_000290.2.hhr 86.5