comparison hd.py @ 18:a8581bf627fd draft

planemo upload for repository https://github.com/monikaheinzl/galaxyProject/tree/master/tools/hd commit b09f6822cb5acf314c5034323501d6300fda25cc
author mheinzl
date Wed, 23 May 2018 14:47:43 -0400
parents 4a30328b1af9
children 2e9f7ea7ae93
comparison
equal deleted inserted replaced
17:4a30328b1af9 18:a8581bf627fd
975 # overallSum21 = sum(sumCol21) 975 # overallSum21 = sum(sumCol21)
976 976
977 # chimeric reads 977 # chimeric reads
978 if len(minHD_tags_zeros) != 0: 978 if len(minHD_tags_zeros) != 0:
979 # absolute difference and tags where at least one half has HD=0 979 # absolute difference and tags where at least one half has HD=0
980 summary15, sumCol15 = createTableHD(listDifference1_zeros, "diff=") 980 summary15, sumCol15 = createTableHD(listDifference1_zeros, "HD=")
981 overallSum15 = sum(sumCol15) 981 overallSum15 = sum(sumCol15)
982 # absolute difference and tags where at least one half has HD=0 982 # absolute difference and tags where at least one half has HD=0
983 # summary23, sumCol23 = createTableFSD2(familySizeList1_diff_zeros, diff=False) 983 # summary23, sumCol23 = createTableFSD2(familySizeList1_diff_zeros, diff=False)
984 # overallSum23 = sum(sumCol23) 984 # overallSum23 = sum(sumCol23)
985 985
994 createFileFSD2(summary5, sumCol5, overallSum5, output_file, 994 createFileFSD2(summary5, sumCol5, overallSum5, output_file,
995 "Family size distribution separated by Hamming distance", sep, 995 "Family size distribution separated by Hamming distance", sep,
996 diff=False) 996 diff=False)
997 997
998 count = numpy.bincount(quant) 998 count = numpy.bincount(quant)
999 output_file.write("{}{}\n".format(sep, f)) 999 #output_file.write("{}{}\n".format(sep, name_file))
1000 output_file.write("\n")
1000 output_file.write("max. family size:{}{}\n".format(sep, max(quant))) 1001 output_file.write("max. family size:{}{}\n".format(sep, max(quant)))
1001 output_file.write("absolute frequency:{}{}\n".format(sep, count[len(count) - 1])) 1002 output_file.write("absolute frequency:{}{}\n".format(sep, count[len(count) - 1]))
1002 output_file.write( 1003 output_file.write(
1003 "relative frequency:{}{}\n\n".format(sep, float(count[len(count) - 1]) / sum(count))) 1004 "relative frequency:{}{}\n\n".format(sep, float(count[len(count) - 1]) / sum(count)))
1004 1005