glasgowcompbio / vimms

A programmable and modular LC/MS simulator in Python
MIT License
19 stars 6 forks source link

IndexError: boolean index did not match indexed array along dimension 0 #272

Closed oolonek closed 1 year ago

oolonek commented 1 year ago

Hi @joewandy

I just explored the demo notebooks and while most of them run smoothly, the demo/01. Data/01. Extracting Chemicals from HMDB.ipynb returns me a

IndexError: boolean index did not match indexed array along dimension 0; dimension is 3 but corresponding boolean dimension is 41

when running the last cell

set_log_level_warning()
env = Environment(mass_spec, controller, min_rt, max_rt, progress_bar=True)
env.run()

It seems this is something you noticed before (#258). Any clue regarding the source of the error ?

oolonek commented 1 year ago

I just had a closer look. I do have the latest vimms version (v2.1.1) installed. However it looks like the changes you proposed in #258 (which are in the git repo), for example https://github.com/glasgowcompbio/vimms/commit/e69f322246102ab5a1cfc5c7c0f27e958e638adb#diff-4c4628e02e0e58c58a0036823da371ef86b51fac90ecbecb7b8841fca59ded1aL719 are not reflected in the pip packge content. See MassSpec.py l.719 in https://files.pythonhosted.org/packages/36/bd/d0edc7a59b853c360b2dd541631d0c0e41e471ce3042cadecac7e667379c/vimms-2.1.1.tar.gz

Is that expected ?

joewandy commented 1 year ago

Hi @oolonek, thank you for your interest in this project, and apologies for the late reply.

I think what you noticed above, it's because the pip package is quite out of date. Version 2.1.1. was created in 12th March 2023, so it doesn't incorporate all the changes we've made since then -- including the bugfix for this issue, which was done on 30th March. I'll release an updated package shortly.

If there's anything else I could help regarding usage, example codes etc, feel free to post questions here, or just email me directly.

Joe

mcbrider5002 commented 1 year ago

@oolonek Looks like Joe updated the pip package version in https://github.com/glasgowcompbio/vimms/commit/7802e61b0cfa83a2268cbc5b5cc615abe4ccceaf and there's a 2.1.3 on pip now if you were waiting to hear when it was done. (If you weren't, ignore me!)

oolonek commented 1 year ago

I was :) Thanks a lot ! Closing, thanks for reactivity. I might come back to you on other ViMMS topics.

joewandy commented 1 year ago

V2.1.3 was a bit broken due to ms_deisotope dependency but that has been fixed. I just released V2.1.4 today, and tested that it works fine, please use that.