comparison BlastParser_and_hits.py @ 3:b4c9c085d709 draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/blastparser_and_hits commit e3881f05134c6f50889d0376d27e1c232251f8b3
author artbio
date Tue, 05 Feb 2019 17:21:41 -0500
parents 36103afa0934
children
comparison
equal deleted inserted replaced
2:36103afa0934 3:b4c9c085d709
60 60
61 61
62 def median(lst): 62 def median(lst):
63 lst = sorted(lst) 63 lst = sorted(lst)
64 if len(lst) < 1: 64 if len(lst) < 1:
65 return None 65 return None
66 if len(lst) % 2 == 1: 66 if len(lst) % 2 == 1:
67 return lst[((len(lst)+1)/2)-1] 67 return lst[((len(lst)+1)/2)-1]
68 if len(lst) % 2 == 0: 68 if len(lst) % 2 == 0:
69 return float(sum(lst[(len(lst)/2)-1:(len(lst)/2)+1]))/2.0 69 return float(sum(lst[(len(lst)/2)-1:(len(lst)/2)+1]))/2.0
70 70
71 71
72 def mean(lst): 72 def mean(lst):
73 if len(lst) < 1: 73 if len(lst) < 1:
74 return 0 74 return 0