Mercurial > repos > guerler > springsuite
changeset 11:21a7dd67b483 draft
"planemo upload commit f208fb81425711754738fc8e612ee2d5cc26377f"
author | guerler |
---|---|
date | Fri, 25 Sep 2020 19:07:14 +0000 |
parents | 860bd6f8f480 |
children | 0ea00dce62ab |
files | spring_minz.py spring_minz.xml test-data/dbCAN_result.txt test-data/pdb70_result.txt |
diffstat | 4 files changed, 22 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- 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 ]]></command> <inputs> - <param format="txt" name="target" type="data" label="Target Profile" help="Homology search result of target/query profile `hhr`."/> + <param format="txt" name="targets" type="data_collection" label="Target Profiles" help="Homology search result of target/query profiles `hhr`."/> <param format="txt" name="inputs" type="data_collection" collection_type="list" label="Input Profiles" help="Homology search results of input profiles `hhr`."/> <param format="txt" name="crossreference" type="data" label="Cross Reference" help="Cross reference of interacting proteins `first_id metadata_id second_id`."/> <param name="minscore" type="integer" label="min-Z score threshold" value="10" min="1" max="100" help="Matching interaction pairs with a score lower than this threshold will be excluded."/> @@ -21,7 +23,11 @@ </outputs> <tests> <test> - <param name="target" value="7BQY_A.hhr"/> + <param name="targets"> + <collection type="list"> + <element name="7BQY_A.hhr" value="7BQY_A.hhr" /> + </collection> + </param> <param name="idx" value="10"/> <param name="inputs"> <collection type="list"> @@ -39,7 +45,11 @@ <output name="output" file="dbCAN_result.txt"/> </test> <test> - <param name="target" value="NP_000282.1.hhr"/> + <param name="targets"> + <collection type="list"> + <element name="NP_000282.1.hhr" value="NP_000282.1.hhr" /> + </collection> + </param> <param name="inputs"> <collection type="list"> <element name="NP_000282.1.hhr" value="NP_000282.1.hhr" />