changeset 8:f2f38991c36f draft

"planemo upload commit ab5e686c62d07a0d45216b474d435b855745222d-dirty"
author guerler
date Sat, 01 Aug 2020 00:35:20 -0400
parents 2b9ed61195e2
children 4ac5d5a9b21c
files spring_minz.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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 = {}