glasgowcompbio / vimms

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

Allow controllers to send multiple precursors #106

Closed joewandy closed 4 years ago

joewandy commented 4 years ago

It seems that in IAPI when sending a custom scan, we can specify multiple precursors and isolation windows, however our codes don't allow this at the moment.

image

image

image

sdrogers commented 4 years ago

Given that python is so wonderfully not type checked...we should be able to just add lists here: https://github.com/sdrogers/vimms/blob/bc128a805f8ef1ae934896c5ddedb454d8721e91/vimms/Environment.py#L225-L228 And then have some code in the MS class that checks if the values in those entries are values or lists?

Will require a change here too to cope with a list: https://github.com/sdrogers/vimms/blob/bc128a805f8ef1ae934896c5ddedb454d8721e91/vimms/MassSpec.py#L141-L152

Propose within the MS (i.e. lower done that method). I.e. controllers pass things as lists of precursors and widths. Within the MS simulator, we convert to windows (as we are doing now). I think this method is the only place where we should ever be using windows instead of (mz,width)

I'm not sure what changes will be required to work with the real MS. But I'm sure @joewandy will.

sdrogers commented 4 years ago

Also, this will need to change: https://github.com/sdrogers/vimms/blob/bc128a805f8ef1ae934896c5ddedb454d8721e91/vimms/MassSpec.py#L525-L528 To:

else:
  isolation_windows = params.compute_isolation_windows()

i.e. no need for if, because ScanParameters.ISOLATION_WINDOWS will never have anything in it (or, at least, shouldn't)