# HG changeset patch # User guerler # Date 1596256520 14400 # Node ID f2f38991c36f367edd1f361302be2eed4d622078 # Parent 2b9ed61195e28bc016d505680ad25606dcdd446d "planemo upload commit ab5e686c62d07a0d45216b474d435b855745222d-dirty" diff -r 2b9ed61195e2 -r f2f38991c36f spring_minz.py --- a/spring_minz.py Sat Aug 01 00:09:18 2020 -0400 +++ b/spring_minz.py Sat Aug 01 00:35:20 2020 -0400 @@ -19,11 +19,11 @@ crossreference[core].append(partner) print ("Loaded cross reference from `%s`." % args.crossreference) targets = get_template_scores(args.target, args.minscore) + interactions = [] if not targets: print("No targets found `%s`" % args.target) else: print ("Loaded target scores from `%s`." % args.target) - interactions = [] for name in names: input_directory = args.inputs.rstrip("/") input_file = "%s/%s" % (input_directory, name) @@ -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: - for i in interactions: - output_file.write("%s %s\n" % (i[0], i[1])) + with open(args.output, 'w') as output_file: + for i in interactions: + output_file.write("%s %s\n" % (i[0], i[1])) def get_template_scores(hhr_file, min_score): result = {}