yarden / MISO

MISO: Mixture of Isoforms model for RNA-Seq isoform quantitation
http://genes.mit.edu/burgelab/miso/index.html
131 stars 75 forks source link

Bug in credible_intervals.py #103

Closed jano15 closed 7 years ago

jano15 commented 7 years ago

location: the file: credible_intervals.py, function: compute_credible_intervals.

in upper_bound_indx = round((1-alpha/2)*num_samples) - 1 .

I get as result for my sample for example 2732.0 . Now this value is used to get the value in sample samples[2732.0]

and then throws this exception: cred_interval = [samples[lower_bound_indx], samples[upper_bound_indx]] IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices

I think the comma is the problem

fix it with: cast as an integer

biobenkj commented 7 years ago

Just encountered this exact issue. Wrapping the round - 1 with int() fixes the issue. Have you set up a pull request?

sepidehparhami commented 7 years ago

Seconded; I encountered this issue yesterday and luckily it's a quick fix. Hope to see a commit for this

biobenkj commented 7 years ago

Why was this closed without comment? Is this incorporated into the source code at this point?

roryk commented 7 years ago

Yep!

biobenkj commented 7 years ago

Excellent! Thanks @roryk