commit/galaxy-central: Jeremy Goecks: Fix divide-by-0 resulting from mean depth of 0 in bai data provider.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/0bc0fd94aaa4/ Changeset: 0bc0fd94aaa4 User: Jeremy Goecks Date: 2014-04-23 22:31:23 Summary: Fix divide-by-0 resulting from mean depth of 0 in bai data provider. Affected #: 1 file diff -r b2cf571d0b63948a7252fc703200b854f964bad6 -r 0bc0fd94aaa4e7c1ede3e291b6c58544c83fc786 lib/galaxy/visualization/data_providers/genome.py --- a/lib/galaxy/visualization/data_providers/genome.py +++ b/lib/galaxy/visualization/data_providers/genome.py @@ -972,7 +972,7 @@ return { 'data': [], 'message': None, 'max_low': start, 'max_high': start } read_len = len( first_read.seq ) - num_reads = ( end - start ) * mean_depth / float ( read_len ) + num_reads = max( ( end - start ) * mean_depth / float ( read_len ), 1 ) threshold = float( max_vals )/ num_reads iterator = itertools.chain( iter( [ first_read ] ), iterator ) 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