comparison fsd.py @ 12:9033fd840986 draft

planemo upload for repository https://github.com/monikaheinzl/galaxyProject/tree/master/tools/fsd commit c55872ebd7721a33174a56124bcd5d6ec1dc20a9
author mheinzl
date Wed, 23 May 2018 14:52:52 -0400
parents b615c7e51f40
children 2921d77df2ee
comparison
equal deleted inserted replaced
11:b615c7e51f40 12:9033fd840986
225 # write data to CSV file 225 # write data to CSV file
226 output_file.write("Values from family size distribution with all datasets\n") 226 output_file.write("Values from family size distribution with all datasets\n")
227 output_file.write("\nFamily size") 227 output_file.write("\nFamily size")
228 for i in label: 228 for i in label:
229 output_file.write("{}{}".format(sep, i)) 229 output_file.write("{}{}".format(sep, i))
230 output_file.write("{}sum".format(sep)) 230 # output_file.write("{}sum".format(sep))
231 output_file.write("\n") 231 output_file.write("\n")
232 j = 0 232 j = 0
233 for fs in counts[1][0:len(counts[1]) - 1]: 233 for fs in counts[1][0:len(counts[1]) - 1]:
234 if fs == 21: 234 if fs == 21:
235 fs = ">20" 235 fs = ">20"
236 else: 236 else:
237 fs = "={}".format(fs) 237 fs = "={}".format(fs)
238 output_file.write("FS{}{}".format(fs, sep)) 238 output_file.write("FS{}{}".format(fs, sep))
239 values_of_fs = [] 239 # values_of_fs = []
240 if len(label) == 1: 240 if len(label) == 1:
241 output_file.write("{}{}".format(int(counts[0][j]), sep)) 241 output_file.write("{}{}".format(int(counts[0][j]), sep))
242 values_of_fs.append(int(counts[0][j])) 242 # values_of_fs.append(int(counts[0][j]))
243 else: 243 else:
244 for n in range(len(label)): 244 for n in range(len(label)):
245 output_file.write("{}{}".format(int(counts[0][n][j]), sep)) 245 output_file.write("{}{}".format(int(counts[0][n][j]), sep))
246 values_of_fs.append(int(counts[0][n][j])) 246 # values_of_fs.append(int(counts[0][n][j]))
247 output_file.write("{}\n".format(sum(values_of_fs))) 247 #output_file.write("{}\n".format(sum(values_of_fs)))
248 j += 1 248 j += 1
249 output_file.write("sum{}".format(sep)) 249 output_file.write("sum{}".format(sep))
250 values_for_sum = [] 250 values_for_sum = []
251 if len(label) == 1: 251 if len(label) == 1:
252 output_file.write("{}{}".format(int(sum(counts[0])), sep)) 252 output_file.write("{}{}".format(int(sum(counts[0])), sep))