glasgowcompbio / vimms

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

Perallelisation test #57

Closed sdrogers closed 4 years ago

sdrogers commented 4 years ago

Write a simple hard-coded controller to test whether we can get pseudo and real parallelisation from the API.

Two experiments:

Experiment 1

MS1 and MS2 analysis both in the orbitrap (i.e. mirroring what we have now) Start controller with a fixed number of MS1 scans, so that we can measure the time between them. Follow this (in the same controller) with a series of TopN blocks (I would hard-code the precursor m/z and just the same one over and over again) Follow it again with some MS1 scans without MS2.

Then look at the time between scan start times. I expect the MS1 scans in the MS1/MS2 blocks to appear shorter than the MS1 in the MS1-only blocks

Experiment 2

As above but set the mass analyser for the MS2 scans to be the linear ion trap

joewandy commented 4 years ago

Both the analyser type ('Orbitrap') and activation type ('HCD') are currently hardcoded inside the FusionBridge. These need to be passed as configurable parameters in order to be able to do Experiment 2.

PS. also make sure they are passed correctly when writing mzML files (see issue #43)

joewandy commented 4 years ago

For the experiment, we also need a controller than can schedule a fixed number of tasks, e.g. send 20 MS1 scans, send ten blocks of TopN, and send 20 MS1 scans again.

joewandy commented 4 years ago

In commit https://github.com/sdrogers/vimms/commit/03f446f12f24799ad53d6c1d0264153d314871c4, I added the options to specify the analyser (IonTrap, Orbitrap) as well as the IsolationMode (None, Quadupole, IonTrap) when sending custom scans.

Currently we're using analyser = 'Orbitrap' and IsolationMode = 'Quadrupole' for both the MS1 and MS2 scans (also in experiment 1).

For experiment 2, we should set analyser = 'IonTrap' and IsolationMode = 'IonTrap', right?

sdrogers commented 4 years ago

Please check, then double check, with Stefan as to what the parameters should be. I think the isolation is always the quad...

joewandy commented 4 years ago

As discussed on slack

So experiment 1 Both MS1 and MS2:

And for experiment 2: MS1:

MS2:

Notebook here: https://github.com/sdrogers/vimms-fusion/blob/master/analysis/experiment_2020_08/01_Parallelisation_Test.ipynb

sdrogers commented 4 years ago

I'm still slightly uncomfortable about any activation_type for MS1 but I guess if the energy is zero, that's ok

joewandy commented 4 years ago

Yeah all along this activation_type for MS1 has been there, but it was hardcoded inside the Fusion bridge, instead of passable from the controller. I guess it's simply ignored by iapi when energy is 0.

joewandy commented 4 years ago

Seems that we've got all the results we need to understand how parallelisation works.