glasgowcompbio / vimms

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

Sequence Manager Implementation #39

Closed joewandy closed 1 year ago

joewandy commented 4 years ago

We would like a flexible architecture that can cover a wide range of possibilities and experiments, e.g. DsDA style analysis, case-control study, etc:

  1. Run controllers in a sequence
  2. Update state based on run results
  3. Fragment/not fragment precursor ions using the state information. This includes a list of interesting things to include/exclude for fragmentation.
    • 'Interesting things' can be defined in many ways.
    • For now, we consider the chromatographic peaks produced from peak picking, e.g. using XCMS, peakonly or mzMine2 (slow?). Please discuss the requirement here before we proceeds to implementation.

For the next experiment, we aim to to test the following experiment on the machine:

  1. Run fullscan (MS1) controller
  2. Run peak picking to produce 'boxes', update boxes to state.
  3. Target boxes in successive runs

@vinnydavies is there anything in https://github.com/sdrogers/vimms/blob/master/vimms/SequenceManager.py that can do the above? or needs to be completed?

sdrogers commented 4 years ago

Something for consideration here:

Parts one and two are quite straightforward. Part 3 could be done in one of two ways:

  1. We send the state a scan and it tells us what to fragment
  2. We ask it what should be fragmented (in general) and it tells us -- i.e. what it thinks is high priority now
  3. We ask it what should be fragmented within some RT window (2 is like this, but for a very wide window)

This goes (I think) to the bottom of the choices to be made...

For the particular example mentioned...

Thoughts?

sdrogers commented 4 years ago

Maybe an alternative is that we pass all scans to the state to update itself. And we then pass an MS1 scan, and it sends back a ranked list of the MS1 in the scan?

joewandy commented 4 years ago

Vinny is on holiday but he left a comment on slack, summarised below:

For the experiment using optimal controller with peak picking in a loop, I wrote something that roughly did this before. In sequence manager OptimalMultiSampleExperiment, no idea whether it still works. Depends whether optimal controller still works I guess.

This does roughly what @joewandy's first comment on this issue asks. It just doesn't do it the way @simon suggested. The code is also in a serious need of reengineering. It made logical sense when I first wrote it, then became very clear soon after that my logic wasn't that solid. My number initial thoughts were to rearrange it with a separate section for processing, so this could be done on another core etc.

There is a half complete notebook called multi sample controllers in OneDrive. The first numbered section generally work and show roughly what the sequence manager can roughly do in terms of basic sequenced runs and gridsearch. There are some examples further down that run samples that are dependent on previous results, but these may not work any longer. I was in the process of updating these but hadnt quite got round to it yet

TODO: check the codes above and see how much can be reused, and what needs to be modified.

joewandy commented 4 years ago

Briefly discussed in the meeting earlier.

Experimental manager (temporary name)

Use case:

Basically it's something that can define a workflow:

joewandy commented 2 years ago

Not sure this is still needed, but sounds like something nice to have. Something to think about.

joewandy commented 1 year ago

State has now been implemented as 'grid' in Ross' work.