Rapid Development of Improved Data-Dependent Acquisition Strategies

Tandem mass spectrometry (LC-MS/MS) is widely used to identify unknown ions in untargeted metabolomics. Data-dependent acquisition (DDA) chooses which ions to fragment based upon intensities observed in MS1 survey scans and typically only fragments a small subset of the ions present. Despite this inefficiency, relatively little work has addressed the development of new DDA methods, partly due to the high overhead associated with running the many extracts necessary to optimize approaches in busy MS facilities. In this work, we first provide theoretical results that show how much improvement is possible over current DDA strategies. We then describe an in silico framework for fast and cost-efficient development of new DDA strategies using a previously developed virtual metabolomics mass spectrometer (ViMMS). Additional functionality is added to ViMMS to allow methods to be used both in simulation and on real samples via an Instrument Application Programming Interface (IAPI). We demonstrate this framework through the development and optimization of two new DDA methods that introduce new advanced ion prioritization strategies. Upon application of these developed methods to two complex metabolite mixtures, our results show that they are able to fragment more unique ions than standard DDA strategies.

S2. Scan timing analysis and comparison with vendor method.
Timings were compared for different methods to understand the difference in the number of scans that each method achieves for a given sample on the real MS hardware. Timings for each scan were calculated by looking at the resulting mzML file and computing the difference in scan start times for successive scans. We adopted this approach as we were interested in the full duty cycle, including any processing in ViMMS. Figure SIAA shows these times plotted against the retention time (RT) of the start of the scan for 6 different methods. These methods included 3 methods that worked through the Thermo Fusion IAPI: a full scan controller in C# (csharp_full) bypassing VIMMS and directly using IAPI, a full scan controller in Python using ViMMS (python_full), and a Top-N controller in Python using ViMMS (python_topn). These were compared against 3 vendor methods created using the Xcalibur software suite: a full scan method (fusion_full), a Top-N method (fusion_topn) and a Top-N method with background exclusion (fusion_topn_be). All methods used the same scan parameters, as detailed in the main paper.
The full scan methods in Figure SIAA allow us to compare the comparative speed of the vendor method with those written in C# and Python as part of ViMMS and hence assess any timing overhead introduced by our use of the IAPI. The results show that there is a small difference (around 0.05) seconds between the time taken for a vendor scheduled scan andscans produced by ViMMS. The difference appears to be as a result of the delay in using the IAPI in order to schedule scans. Our implementation requires a bridge between the IAPI (C#) and python (ViMMS). The very small difference between csharp_full and python_full suggest that this additional translation is not costly.
Comparison of the TopN methods is more difficult. The vendor TopN method makes use of some level of parallelisation (Senko et al., 2013). The MS2 scans scheduled from a particular MS1 are started after the next MS1 scan has been injected. This means that the time between successive scan start times doesn't always reflect that actual time a scan takes but, for most MS1 scans, just gives the injection time. This can be seen in the vendor scenario 1 in Figure (Senko et al., 2013) where they have full parallelisation due to the MS2 scans being performed in the linear ion trap whereas we perform MS2 scans in the orbitrap. This is also why the first MS2 scans in the vendor setup take longer than subsequent ones: they can start injection after the MS1 injection, but scanning cannot start until the MS1 scanning is finished.
Scenario 1 in the vendor block of Figure SI-1 shows how the first MS2 scan scheduled from MS1 scan 1 starts after the injection of MS1 scan 2 (the time labeled A). Direct comparison of scan times is therefore not possible. However, we can compare the MS1 scan cycle time in situations where no MS2 are scheduled from the previous MS1 scan. This is shown in vendor scenario 2. Here, no scans are scheduled from MS1 scan 1 meaning that the time from the start of MS1 scan 2 to the start of MS1 scan 3 does give us an indication of the MS1 cycle time. As we do not make use of parallelisation in our methods, the times are consistent, regardless of whether or not MS2 scans are scheduled.
Figure SI-2 shows a comparison of MS1 times for TopN methods where vendor times are limited to only the MS1 scan times for scans where no MS2 were scheduled from the previous MS1 scan (time B in vendor scenario 2 in Figure SI-1). We see roughly the same 0.05 second overheard for our methods (compare python_topn with fusion_topn_be). As we only plot vendor instances when no MS2 are scheduled, these are concentrated to the edges of the plot where the chromatogram is less busy. Fusion_topn_be is a machine TopN method with background exclusion turned on. Fusion_topn has no background exclusion and as such we see very few instances when it doesn't fragment and therefore very few points on this plot.
This analysis allows us to conclude that there is very little overhead associated with our use of the IAPI but there may be benefits in the future of implementing similar parallelisation to that provided in the vendor method in our controllers as the parallelisation allows the vendor method to produce many more scans in total. For example, where our TopN controller did 6786 scans in total for Beer (652 MS1 and 6134 MS2), the vendor controller (fusion_topn) with the same scan parameters managed 9901 scans (1299 MS1 and 8602 MS2). It is interesting to note that this dramatic increase in number of scans does not translate to a large improvement in performance. Parellisation must be used with care however. Studying Figure S1, we can see that the parallelisation can lead to a very large time between the survey scan and the later MS2 scans scheduled from it. Consider, for example, the large time from MS1 scan 2 until its MS2 scans. Smaller peaks may have stopped eluting by the time they are needed for fragmentation. Indeed, in our analysis (and other analysis pipelines too), when looking for the precursor m/z for the MS2 scans scheduled from MS1 scan 2, we would actually look to the most recent MS1 (which in this case would be MS1 scan 3). We hypothesis that this may be what is causing the reduction in performance for Serum of the vendor TopN over our TopN, but testing that hypotheses is outside the scope of this work.

S3. Results for alternative peak picking methods
To ensure our results were not biased by a particular peak picking algorithm, we evaluated performance using two other methods. The Centwave algorithm from XCMS (Smith et al., 2006) and peakonly: a recently proposed method based on a convolutional neural network (Melnikov, Tsentalovich and Yanshole, 2020). Peakonly was run with default parameters whilst XCMS parameters were tuned to give a roughly comparable number of peaks to those found with MzMine.
--the parameters are shown in

S4. Computing theoretical fragmentation bounds
We here provide more details on the optimal matching.
A graph G=(V,E) is a pair of sets V and E, where V is a set of vertices and E a set of edges. Each edge is an unordered pair of vertices. The vertices that are joined by an edge are known as the endpoints of the edge.

Figure SI-3: (a) Bipartite graph G and (b) G with a maximum matching shown in red.
W={w 1 ,w 2 ,w 3 ,w 4 ,w 5 } corresponds to MS2 scans, U={u 1 ,u 2 ,u 3 ,u 4 ,u 5 ,u 6 } corresponds to peak bounding boxes (from peak picking). Edges are drawn for MS2 scans that can be connected to bounding boxes if certain conditions are met to produce the fragmentation events.
A bipartite graph is a graph for which V is the union of two distinct sets, W and U, say, and for which every edge has one endpoint in W, and one endpoint in V. Figure SI-3(a) shows a bipartite graph G 1 where W={w 1 ,w 2 ,w 3 ,w 4 ,w 5 } and U={u 1 ,u 2 ,u 3 ,u 4 ,u 5 ,u 6 }. Here W corresponds to MS2 scans, while U corresponds to the peak boxes. A matching (Erciyes, 2018) of graph G is a subset M of E such that no two edges in M share an endpoint. A maximum matching M is a matching such that no matching Mʹ of G contains more edges. Figure SI-3(b) shows a maximum matching of G 1 (red edges). Polynomial time algorithms exist to find maximum matchings. The problem can be solved by adding source and sink nodes and then using an optimised version of the Ford-Fulkerson algorithm (Ford and Fulkerson, 1956) to solve the resulting maximum network flow problem. This algorithm runs in O(|V|.|E|) time. An alternative, faster (O(√|V|.|E|)algorithm is the Hopcroft-Karp algorithm (Hopcroft and Karp, 1973), on which we base our implementation.

S7. In-silico optimisation of controllers
In order to optimise the parameters for the SmartROI and WeightedDEW methods we completed a grid search of a some possible parameters in simulation within the ViMMS framework. We firstly converted an .mzml file from a recent real TopN run for each sample into ViMMS chemicals, allowing us to run in-silico simulations for each method and dataset. For each method we then chose a number of possible values for the parameters as given on the x and y axes of the plots. For each combination of parameters and dataset we then ran a simulation in ViMMS and calculated the coverage (colour scale on right hand side of the plots) based on peaks picked from the original .mzml file. The final choice of parameter to use on the real sample were chosen such that they had consistent high performance across both samples for each method.

S8. Performance comparison for different dataset sizes
We have compared the performance of the WeightedDEW, SmartROI and Top-N methods as the complexity of the sample increased. Dataset were generated with 250,500,750,1000,1250,1500,1750,2000,2250,2500,2750 and 3000 Gaussian shaped chemicals using ViMMS, with 3 replicates in each case. Each method was ran with each samples with the resulting average coverage calculated. In Figure

S9. Intensity analysis of fragmented precursor peaks
We evaluated how WeightedDEW, SmartROI and Top-N methods varied in terms of the precursor peak intensity at fragmentation. For each picked peak using MZMine2, we determined the intensity of the precursor ions when fragmentation events occurred (if multiple fragmentation events were to occur within a single picked peak, the one with the largest precursor intensity was selected). It is important to note that all methods were set to never fragment below a minimum MS1 intensity (5000).
Figure SI-6 shows the cumulative plots of fragmented precursor peaks intensities. The results in Figure SI-6A and C demonstrated that the SmartROI and WeightedDEW methods were able to fragment more precursor peaks of lower intensities that Top-N missed (right hand region of the plots) for Serum and Beer respectively. The results here agree with the increased coverage in Table 1 of the main text. Note that all fragmentation events are already above the minimum intensity for fragmentation defined by the user during the acquisition, so increased coverage means a greater number of potentially useful fragmentation spectra could be obtained.
To determine if there is a consistent difference in fragmented precursor intensities, we identified 429 and 779 common peaks that were fragmented by all three methods in the Serum and Beer samples respectively. Plotting the same cumulative plots for these common peaks ( Figure SI-6 B and D), we see that the increased coverage from SmartROI and WeightedDEW comes at the cost of a slight reduction of precursor intensities at the time of fragmentation compared to Top-N (Top-N curve slightly higher than others in left-hand region). This is not surprising, as Top-N is a method that prioritises based on intensity, while the other two methods attempt to balance coverage and intensity.