comparison cwpair2_util.py @ 3:436dc65bd902 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/cwpair2 commit f924b8d7ac95d574cad6b81b6cd49a9c1f642483
author iuc
date Tue, 13 Dec 2016 09:25:15 -0500
parents abc464ca7260
children 71188f3f4b76
comparison
equal deleted inserted replaced
2:abc464ca7260 3:436dc65bd902
190 190
191 def match_mode(window, peak, mode): 191 def match_mode(window, peak, mode):
192 if not window: 192 if not window:
193 return None 193 return None
194 return min(window, key=lambda cpeak: abs(distance(peak, cpeak) - mode)) 194 return min(window, key=lambda cpeak: abs(distance(peak, cpeak) - mode))
195
195 196
196 METHODS = {'mode': match_mode, 'closest': match_closest, 'largest': match_largest} 197 METHODS = {'mode': match_mode, 'closest': match_closest, 'largest': match_largest}
197 198
198 199
199 def frequency_plot(freqs, fname, labels=[], title=''): 200 def frequency_plot(freqs, fname, labels=[], title=''):