Mercurial > repos > guerler > springsuite
diff spring_minz.py @ 11:21a7dd67b483 draft
"planemo upload commit f208fb81425711754738fc8e612ee2d5cc26377f"
author | guerler |
---|---|
date | Fri, 25 Sep 2020 19:07:14 +0000 |
parents | 4ac5d5a9b21c |
children | 4a4888bf0338 |
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)