commit/galaxy-central: carlfeberhard: Fix median aggregate statistic f in ColumnDataProvider
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/253c49c5b497/ Changeset: 253c49c5b497 User: carlfeberhard Date: 2013-06-12 16:32:26 Summary: Fix median aggregate statistic f in ColumnDataProvider Affected #: 1 file diff -r 6c855331fda0446a5379ea765fec0455e9bf1963 -r 253c49c5b4977a49d2f87ff7729a2fe575c0c355 lib/galaxy/visualization/data_providers/basic.py --- a/lib/galaxy/visualization/data_providers/basic.py +++ b/lib/galaxy/visualization/data_providers/basic.py @@ -178,10 +178,9 @@ meta[ 'mean' ] = float( meta[ 'sum' ] ) / count sorted_data = sorted( response[ 'data' ][ index ] ) - # even data count - middle_index = ( count / 2 ) - 1 if count % 2 == 0: - meta[ 'median' ] = sum( sorted_data[ middle_index : ( middle_index + 1 ) ] ) / 2.0 + meta[ 'median' ] = ( ( sorted_data[ middle_index ] + sorted_data[( middle_index + 1 )] ) / 2.0 ) else: meta[ 'median' ] = sorted_data[ middle_index ] Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org