Documentation for Controllers
Controllers in ViMMS implement fragmentation strategies, determining which ions in an MS1 (survey) scan should be fragmented. A standard fragmentation strategy used in data-dependant acquisition (DDA) is the Top-N strategy, where the top N most intense ions in the survey scan are fragmented. This strategy is implemented in the TopNController in ViMMS.
In addition to Top-N, several other DDA strategies have been implemented that improve upon the standard TopN controller (for more details, refer to our papers).
ViMMS also includes implementations of several common data-independent acquisition (DIA) strategies such as All-ion-fragmentation (AIF), SWATH-MS (Sequential Windowed Acquisition of All Theoretical Fragment Ion Mass Spectra).
The following are broad categories of controllers that are available in ViMMS:
AIF
Bases: Controller
A controller that implements the All-ion-fragmentation (AIF) DIA fragmentation strategy. Should be used in conjunction with MS-DIAL for deconvolution.
Source code in vimms/Controller/dia.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | |
__init__(ms1_source_cid_energy, advanced_params=None)
Initialise an AIF controller Args: ms1_source_cid_energy: source CID energy for MS1 scan advanced_params: an vimms.Controller.base.AdvancedParams object that contains advanced parameters to control the mass spec. If left to None, default values will be used.
Source code in vimms/Controller/dia.py
24 25 26 27 28 29 30 31 32 33 34 35 | |
write_msdial_experiment_file(filename)
Generates a file that can be read by MS-DIAL to perform deconvolution
| Parameters: |
|
|---|
Returns: None
Source code in vimms/Controller/dia.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
AdvancedParams
An object that stores advanced parameters used to control the mass spec e.g. AGC target, collision energy, orbitrap resolution etc.
When ViMMS is connected to an actual mass spec instrument (Orbitrap Fusion in our case) via IAPI, most of these values are directly passed to the mass spec as they are. Generally you can leave these settings to their default.
In simulated use, most of these values are not used and therefore they won't affect simulated results.
Source code in vimms/Controller/base.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | |
__init__(default_ms1_scan_window=DEFAULT_MS1_SCAN_WINDOW, ms1_agc_target=DEFAULT_MS1_AGC_TARGET, ms1_max_it=DEFAULT_MS1_MAXIT, ms1_collision_energy=DEFAULT_MS1_COLLISION_ENERGY, ms1_orbitrap_resolution=DEFAULT_MS1_ORBITRAP_RESOLUTION, ms1_activation_type=DEFAULT_MS1_ACTIVATION_TYPE, ms1_mass_analyser=DEFAULT_MS1_MASS_ANALYSER, ms1_isolation_mode=DEFAULT_MS1_ISOLATION_MODE, ms1_source_cid_energy=DEFAULT_SOURCE_CID_ENERGY, ms2_agc_target=DEFAULT_MS2_AGC_TARGET, ms2_max_it=DEFAULT_MS2_MAXIT, ms2_collision_energy=DEFAULT_MS2_COLLISION_ENERGY, ms2_orbitrap_resolution=DEFAULT_MS2_ORBITRAP_RESOLUTION, ms2_activation_type=DEFAULT_MS2_ACTIVATION_TYPE, ms2_mass_analyser=DEFAULT_MS2_MASS_ANALYSER, ms2_isolation_mode=DEFAULT_MS2_ISOLATION_MODE, ms2_source_cid_energy=DEFAULT_SOURCE_CID_ENERGY)
Create an advanced parameter object
| Parameters: |
|
|---|
Source code in vimms/Controller/base.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | |
AgentBasedController
Bases: Controller
A class that implements an agent-based controller.
Source code in vimms/Controller/abc.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | |
__init__(agent, advanced_params=None)
Initialises an agent-based controller.
| Parameters: |
|
|---|
Source code in vimms/Controller/abc.py
16 17 18 19 20 21 22 23 24 | |
CaseControlNonOverlapController
Bases: TopNEXtController
Case-control non-overlap controller
Source code in vimms/Controller/box.py
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | |
Controller
Bases: ABC
Abtract base class for controllers.
Source code in vimms/Controller/base.py
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 | |
__init__(advanced_params=None)
Initialise a base Controller class.
| Parameters: |
|
|---|
Source code in vimms/Controller/base.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | |
after_injection_cleanup()
Clean-up method at the end of each injection.
Returns: None
Source code in vimms/Controller/base.py
372 373 374 375 376 377 378 379 | |
dump_scans(output_method)
Dump all scans to the output format. Useful for debugging.
| Parameters: |
|
|---|
Returns: None
Source code in vimms/Controller/base.py
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | |
get_initial_scan_params()
Gets the initial scan parameters to send to the mass spec that starts the whole process. Will default to sending an MS1 scan with whatever parameters passed in self.params. Subclasses can override this to return different types of scans.
Returns: a vimms.Common.ScanParameters object describing the initial scan to make.
Source code in vimms/Controller/base.py
219 220 221 222 223 224 225 226 227 228 229 | |
get_initial_tasks()
Gets the initial tasks to load immediately into the mass spec (before acquisition starts)
Returns: an empty list of tasks, unless overridden by subclass
Source code in vimms/Controller/base.py
209 210 211 212 213 214 215 216 217 | |
get_ms1_scan_params(metadata=None)
Generate a default scan parameter for MS1 scan. The generated scan parameter object is typically passed to the mass spec (whether real or simulated) that produces the actual MS1 scan. Args: metadata: any additional metadata to include
Returns: a vimms.Common.ScanParameters object that describes the MS1 scan to generate.
Source code in vimms/Controller/base.py
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | |
get_ms2_scan_params(mz, intensity, precursor_scan_id, isolation_width, mz_tol, rt_tol, metadata=None)
Generate a default scan parameter for MS2 scan. The generated scan parameter object is typically passed to the mass spec (whether real or simulated) that produces the actual MS2 scan.
| Parameters: |
|
|---|
Returns: a vimms.Common.ScanParameters object that describes the MS2 scan to generate.
Source code in vimms/Controller/base.py
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | |
handle_scan(scan, current_size, pending_size)
Basic codes to handle an incoming scan, which is generally the same for all controllers.
| Parameters: |
|
|---|
Returns: a list of new vimms.Common.ScanParameters describing what to do next.
Source code in vimms/Controller/base.py
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 | |
set_environment(env)
Set the environment used to run this controller
| Parameters: |
|
|---|
Returns: None
Source code in vimms/Controller/base.py
231 232 233 234 235 236 237 238 239 240 241 | |
update_state_after_scan(last_scan)
abstractmethod
Update internal state after a scan has been processed.
| Parameters: |
|
|---|
Source code in vimms/Controller/base.py
287 288 289 290 291 292 293 294 | |
DEWFilter
Bases: ScoreFilter
A class that implements dynamic exclusion filter
Source code in vimms/Exclusion.py
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 | |
__init__(rt_tol)
Initialises a dynamic exclusion filter based on time only Args: rt_tol: the RT tolerance (in seconds)
Source code in vimms/Exclusion.py
492 493 494 495 496 497 498 | |
filter(current_rt, rois)
Check whether intensity values are above or below the threshold Args: current_rt: the current RT value rois: a list of vimms.Roi.Roi objects.
Returns: an array of indicators for the filter
Source code in vimms/Exclusion.py
500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 | |
DiaController
Bases: Controller
A class for doing tree and nested DIA methods. Also has a SWATH type controller, but reccommend to use SWATH class above. Method uses windows methods from DIA.py to create the pattern of windows needed to run the controllers. Note: the following method used multiple simultaneous isolation windows
Source code in vimms/Controller/dia.py
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 | |
DiaWindows
Class for creating windows for basic, tree and nested DIA methods. Method is used in DiaController in Controller/dia. Basic methods are approximately equal to a SWATH method with no overlapping windows
Source code in vimms/DIA.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | |
DsDAController
Bases: WrapperController
A controller which allows running the DsDA (Dataset-Dependent Acquisition) method.
See the original publication for a description of DsDA:
Broeckling, Hoyes, et al. "Comprehensive Tandem-Mass-Spectrometry coverage of complex samples enabled by Data-Set-Dependent acquisition." Analytical Chemistry. 90, 8020–8027 (2018).
Source code in vimms/Controller/misc.py
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 | |
__init__(dsda_state, mzml_name, advanced_params=None, task_filter=None)
Initialise a new DsDAController instance.
| Parameters: |
|
|---|
Source code in vimms/Controller/misc.py
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | |
FixedScansController
Bases: Controller
A controller which takes a schedule of scans, and converts them into tasks in a queue.
The base class for pre-scheduled controllers like vimms.Controller.misc.DsDAController and vimms.Controller.misc.MatchingController.
Source code in vimms/Controller/misc.py
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 | |
__init__(schedule=None, advanced_params=None, expected_rts=None, task_filter=None)
Create a FixedScansController.
| Parameters: |
|
|---|
Source code in vimms/Controller/misc.py
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | |
get_initial_scan_params()
Returns the initial scan parameter object to send when acquisition starts
Returns: The initial task.
Source code in vimms/Controller/misc.py
224 225 226 227 228 229 230 231 232 233 | |
get_initial_tasks()
Returns all initial tasks for the mass spec queue.
Returns: List of tasks.
Source code in vimms/Controller/misc.py
211 212 213 214 215 216 217 218 219 220 221 222 | |
set_tasks(schedule)
Set a new schedule for this controller.
| Parameters: |
|
|---|
Source code in vimms/Controller/misc.py
235 236 237 238 239 240 241 242 243 244 | |
FlexibleNonOverlapController
Bases: TopNEXtController
TODO: this class can probably be removed.
Source code in vimms/Controller/box.py
231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | |
GenericBox
Bases: Box
Makes no particular assumptions about bounding boxes.
Source code in vimms/Box.py
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | |
non_overlap_split(other_box)
Finds 1 to 4 boxes describing the polygon of area of this box not overlapped by other_box. If one box is found, crops this box to dimensions of that box, and returns None. Otherwise, returns list of 2 to 4 boxes. Number of boxes found is equal to number of edges overlapping area does NOT share with this box.
Source code in vimms/Box.py
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 | |
IdleController
Bases: Controller
A controller that doesn't do any controlling. Mostly used as a skeleton code to illustrate the code structure in ViMMS controllers.
Source code in vimms/Controller/fullscan.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |
__init__(advanced_params=None)
Initialise an idle controller Args: advanced_params: an vimms.Controller.base.AdvancedParams object that contains advanced parameters to control the mass spec. If left to None, default values will be used.
Source code in vimms/Controller/fullscan.py
15 16 17 18 19 20 21 22 23 | |
IntensityNonOverlapController
Bases: IntensityTopNEXtController
A variant of the non-overlap controller but it takes into account intensity changes.
Source code in vimms/Controller/box.py
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | |
LengthFilter
Bases: ScoreFilter
A class that implements a check on minimum length of ROI for fragmentation
Source code in vimms/Exclusion.py
549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 | |
__init__(min_roi_length_for_fragmentation)
Initialise a length filter
| Parameters: |
|
|---|
Source code in vimms/Exclusion.py
554 555 556 557 558 559 560 561 | |
filter(roi_lengths)
Check that ROI lengths are above the threshold Args: roi_lengths: a numpy array of ROI lengths
Returns: an array of indicator whether the lengths are above threshold
Source code in vimms/Exclusion.py
563 564 565 566 567 568 569 570 571 572 | |
MS2PlannerController
Bases: FixedScansController
A controller that interfaces with MS2Planner, as described in:
Zuo, Zeyuan, et al. "MS2Planner: improved fragmentation spectra coverage in untargeted mass spectrometry by iterative optimized data acquisition." Bioinformatics 37.Supplement_1 (2021): i231-i236.
Source code in vimms/Controller/misc.py
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 | |
boxfile2ms2planner(reader, inpath, outpath)
staticmethod
Transform peak-picked box file to ms2planner default format.
| Parameters: |
|
|---|
Returns: None
Source code in vimms/Controller/misc.py
325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 | |
minimise_distance(target, *args)
staticmethod
Solve argmin(a1, a2 ... an)(a1x1 + ... + anxn - t) for non-negative integer a1...an and non-negative reals x1...xn, t using backtracking search. i.e. Schedule tasks of different fixed lengths s.t. the last task ends as close to the target time as possible.
| Parameters: |
|
|---|
Returns: the best coefficients
Source code in vimms/Controller/misc.py
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 | |
mzmine2ms2planner(inpath, outpath)
staticmethod
Transform MZMine2 box file to ms2planner default format.
| Parameters: |
|
|---|
Returns: None
Source code in vimms/Controller/misc.py
370 371 372 373 374 375 376 377 378 379 380 381 382 383 | |
sched_dict2params(schedule, scan_duration_dict)
staticmethod
Scan_duration_dict matches the format of MS scan_duration_dict with fixed scan lengths.
| Parameters: |
|
|---|
Returns: new schedule
Source code in vimms/Controller/misc.py
449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 | |
MZMineParams
dataclass
Bases: AbstractParams
Wrapper class to run MZMine 2 peak-picking from the ViMMS codebase. MZMine 2 allows commands for its processing pipeline to be stored in an .xml and then run via command line using its "batch mode" executable. Given an appropriate "template" .xml this class will substitute input and output file names into it and then run it in batch mode via subprocess.
NOTE: MZMine is not installed with ViMMS. It must be installed separately and the path to the "batch mode" executable specified for this class.
| Parameters: |
|
|---|
Source code in vimms/PeakPicking.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | |
check_files_match(fullscan_names, aligned_path, mode='subset')
staticmethod
Check that the source files listed in the header of a peak-picking output match an input list.
| Parameters: |
|
|---|
| Tuple of boolean reporting whether test succeeded, the |
|
|---|
Source code in vimms/PeakPicking.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | |
pick_aligned_peaks(input_files, output_dir, output_name, force=False)
Run MZMine batch mode file for a list of input files.
| Parameters: |
|
|---|
Returns: Full path the output file was written to.
Source code in vimms/PeakPicking.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | |
read_aligned_csv(box_file_path)
staticmethod
Parse in an aligned boxfile in MZMine 2 format. Each column in an aligned boxfile either has properties related to the whole row (e.g. average m/z of the peak aligned on that row) or a property specific property of an unaligned peak from a parent .mzML. Row properties are parsed into a list of dictionaries (one dictionary per row) in the form [{property_name: value}, ...]. .mzML properties are loaded into a similar list but with a nested dictionary i.e. [{mzml_name: {property_name: value}}, ...].
| Parameters: |
|
|---|
| Tuple of .mzML names and iterable of pairs of row dicts |
|
|---|
Source code in vimms/PeakPicking.py
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | |
MatchingController
Bases: FixedScansController
A pre-scheduled controller that executes a scan queue planned by a maximum bipartite matching from [vimms.Matching][].
Source code in vimms/Controller/misc.py
609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 | |
from_matching(matching, isolation_width, advanced_params=None, task_filter=None)
classmethod
Construct a list of MatchingControllers (one for each injection) from a potentially multi-injection matching.
| Parameters: |
|
|---|
Source code in vimms/Controller/misc.py
615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 | |
MinIntensityFilter
Bases: ScoreFilter
A class that implements minimum intensity filter
Source code in vimms/Exclusion.py
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 | |
__init__(min_ms1_intensity)
Initialises the minimum intensity filter Args: min_ms1_intensity: the minimum intensity to check
Source code in vimms/Exclusion.py
467 468 469 470 471 472 473 | |
filter(intensities)
Check whether intensity values are above or below the threshold Args: intensities: an array of intensity values
Returns: an array of indicators for the filter
Source code in vimms/Exclusion.py
475 476 477 478 479 480 481 482 483 484 | |
MultiIsolationController
Bases: Controller
A controller used to test multiple isolations in a single MS2 scan.
Source code in vimms/Controller/misc.py
640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 | |
__init__(N, isolation_width=DEFAULT_ISOLATION_WIDTH, advanced_params=None)
Initialise a multi-isolation controller Args: N: the number of precursor ions to fragment isolation_width: isolation width, in Dalton advanced_params: an vimms.Controller.base.AdvancedParams object that contains advanced parameters to control the mass spec. If left to None, default values will be used.
Source code in vimms/Controller/misc.py
645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 | |
NonOverlapController
Bases: TopNEXtController
A controller that implements the non-overlapping idea to determine how regions-of-interests
should be fragmented across injections.
Source code in vimms/Controller/box.py
203 204 205 206 207 208 209 210 211 | |
ReTopNController
Bases: TopNEXtController
Reimplementation of the topN controller in the topNEXt framework, allowing it to use features like inclusion boxes.
Source code in vimms/Controller/box.py
153 154 155 156 157 158 159 160 | |
RoiBuilder
A class to construct ROIs. This can be used in real-time to track ROIs in a controller, or for extracting ROIs from an mzML file.
Source code in vimms/Roi.py
527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 | |
__init__(roi_params, smartroi_params=None)
Initialises an ROI Builder object.
| Parameters: |
|
|---|
Source code in vimms/Roi.py
533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 | |
add_scan_to_roi(scan)
Stores the information on which scans and frag events are associated to this ROI
Source code in vimms/Roi.py
780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 | |
get_good_rois()
Returns all ROIs above filtering criteria
Source code in vimms/Roi.py
803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 | |
get_mz_intensity(i)
Returns the (m/z, intensity, ROI ID) value of point at position i in this ROI
| Parameters: |
|
|---|
Returns: a tuple of (mz, intensity, roi ID)
Source code in vimms/Roi.py
738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 | |
get_rois()
Returns all ROIs
Source code in vimms/Roi.py
797 798 799 800 801 | |
set_fragmented(current_task_id, i, roi_id, rt, intensity)
Updates this ROI to indicate that it has been fragmented
| Parameters: |
|
|---|
Returns: None
Source code in vimms/Roi.py
754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 | |
update_roi(new_scan)
Updates ROI in real-time based on incoming scans
| Parameters: |
|
|---|
Returns: None
Source code in vimms/Roi.py
564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 | |
RoiController
Bases: TopNController
An ROI based controller with multiple options
Source code in vimms/Controller/roi.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 | |
MS2Scheduler
A class that performs MS2 scheduling of tasks
Source code in vimms/Controller/roi.py
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | |
__init__(parent)
Initialises an MS2 scheduler Args: parent: the parent controller class
Source code in vimms/Controller/roi.py
107 108 109 110 111 112 113 114 | |
schedule_ms2s(new_tasks, ms2_tasks, mz, intensity)
Schedule a new MS2 scan by creating a new default MS2 vimms.Common.ScanParameters. Args: new_tasks: the list of new tasks in the environment ms2_tasks: the list of MS2 tasks in the environment mz: the precursor m/z to fragment intensity: the precusor intensity to fragment
Returns: None
Source code in vimms/Controller/roi.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | |
__init__(ionisation_mode, isolation_width, N, mz_tol, rt_tol, min_ms1_intensity, roi_params, smartroi_params=None, min_roi_length_for_fragmentation=0, ms1_shift=0, advanced_params=None, exclusion_method=ROI_EXCLUSION_DEW, exclusion_t_0=None)
Initialise an ROI-based controller Args: ionisation_mode: ionisation mode, either POSITIVE or NEGATIVE isolation_width: isolation width in Dalton N: the number of highest-score precursor ions to fragment mz_tol: m/z tolerance -- m/z tolerance for dynamic exclusion window rt_tol: RT tolerance -- RT tolerance for dynamic exclusion window min_ms1_intensity: the minimum intensity to fragment a precursor ion roi_params: an instance of vimms.Roi.RoiBuilderParams that describes how to build ROIs in real time based on incoming scans. smartroi_params: an instance of vimms.Roi.SmartRoiParams. If provided, then the SmartROI rules (as described in the paper) will be used to select which ROI to fragment. Otherwise set to None to use standard ROIs. min_roi_length_for_fragmentation: how long a ROI should be before it can be fragmented. ms1_shift: advanced parameter -- best to leave it. advanced_params: an vimms.Controller.base.AdvancedParams object that contains advanced parameters to control the mass spec. If left to None, default values will be used. exclusion_method: an instance of vimms.Exclusion.TopNExclusion or its subclasses, used to describe how to perform dynamic exclusion so that precursors that have been fragmented are not fragmented again. exclusion_t_0: parameter for WeightedDEW exclusion (refer to paper for details).
Source code in vimms/Controller/roi.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |
schedule_ms1(new_tasks)
Schedule a new MS1 scan by creating a new default MS1 vimms.Common.ScanParameters. Args: new_tasks: the list of new tasks in the environment
Returns: None
Source code in vimms/Controller/roi.py
88 89 90 91 92 93 94 95 96 97 98 99 100 | |
SWATH
Bases: Controller
A controller that implements SWATH-MS (Sequential Windowed Acquisition of All Theoretical Fragment Ion Mass Spectra) DIA fragmentation strategy. Should be used in conjunction with MS-DIAL for deconvolution.
Source code in vimms/Controller/dia.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | |
__init__(min_mz, max_mz, width, scan_overlap=0, advanced_params=None)
Initialise a SWATH-MS controller
| Parameters: |
|
|---|
Source code in vimms/Controller/dia.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | |
write_msdial_experiment_file(filename)
Generates a file that can be read by MS-DIAL to perform deconvolution
| Parameters: |
|
|---|
Returns: None
Source code in vimms/Controller/dia.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | |
ScanItem
Represents a scan item object. Used by the WeightedDEW controller to store the pair of m/z and intensity values along with their associated weight
Source code in vimms/Controller/topN.py
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 | |
__init__(mz, intensity, weight=1)
Initialise a ScanItem object Args: mz: m/z value intensity: intensity value weight: the weight for this ScanItem
Source code in vimms/Controller/topN.py
196 197 198 199 200 201 202 203 204 205 206 | |
ScanParameters
A class to store parameters used to instruct the mass spec how to generate a scan. This object is usually created by the controller. It is used by the controller to instruct the mass spec what actions (scans) to perform next.
Source code in vimms/Common.py
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 | |
__init__()
Create a scan parameter object
Source code in vimms/Common.py
331 332 333 334 335 | |
compute_isolation_windows()
Gets the full-width (DDA) isolation window around a precursor m/z
Source code in vimms/Common.py
370 371 372 373 374 375 376 377 | |
get(key)
Gets scan parameter value
| Parameters: |
|
|---|
Returns: the corresponding value in this ScanParameter
Source code in vimms/Common.py
349 350 351 352 353 354 355 356 357 358 359 360 361 | |
get_all()
Get all scan parameters Returns: all the scan parameters
Source code in vimms/Common.py
363 364 365 366 367 368 | |
set(key, value)
Set scan parameter value
| Parameters: |
|
|---|
Returns: None
Source code in vimms/Common.py
337 338 339 340 341 342 343 344 345 346 347 | |
SimpleMs1Controller
Bases: Controller
A simple MS1 controller which does a full scan of the chemical sample, but no fragmentation
Source code in vimms/Controller/fullscan.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
__init__(advanced_params=None)
Initialise a full-scan MS1 controller Args: advanced_params: an vimms.Controller.base.AdvancedParams object that contains advanced parameters to control the mass spec. If left to None, default values will be used.
Source code in vimms/Controller/fullscan.py
42 43 44 45 46 47 48 49 50 | |
SmartROIFilter
Bases: ScoreFilter
A class that implements SmartROI filtering criteria. For more details, refer to our paper 'Rapid Development ...'
Source code in vimms/Exclusion.py
575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 | |
filter(rois)
Filter ROIs based on SmartROI rules.
| Parameters: |
|
|---|
Returns: an array of indicator whether ROI can be fragmented or not.
Source code in vimms/Exclusion.py
581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 | |
TargetedController
Bases: Controller
A controller that is given a list of m/z and RT values to target Attempts to acquire n_replicates of each target at each CE
Source code in vimms/Controller/targeted.py
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | |
TaskFilter
Can be used with vimms.Controller.misc.FixedScansController and its subclasses to resynchronise scan RTs if they don't go according to schedule. New scans are dynamically added or deleted if the current RT is before or after the planned RT by a certain threshold (scaled to scan lengths).
Source code in vimms/Controller/misc.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | |
__init__(ms1_length, ms2_length, skip_margin=0.5, add_margin=1.2)
Create a new TaskFilter.
| Parameters: |
|
|---|
Source code in vimms/Controller/misc.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | |
get_task(scan, scan_id, precursor_id, task_idx, expected_rts, tasks)
Gets the next task and updates the current task index for the parent controller.
| Parameters: |
|
|---|
Returns: Tuple of new task index and next task.
Source code in vimms/Controller/misc.py
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | |
TopNController
Bases: Controller
A controller that implements the standard Top-N DDA fragmentation strategy. Does an MS1 scan followed by N fragmentation scans of the peaks with the highest intensity that are not excluded
Source code in vimms/Controller/topN.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | |
__init__(ionisation_mode, N, isolation_width, mz_tol, rt_tol, min_ms1_intensity, ms1_shift=0, initial_exclusion_list=None, advanced_params=None, force_N=False, exclude_after_n_times=1, exclude_t0=0)
Initialise the Top-N controller
| Parameters: |
|
|---|
Source code in vimms/Controller/topN.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
TopNEXtController
Bases: RoiController
A multi-sample controller that use a grid to track which regions-of-interests (ROIs) have been fragmented across multiple injections.
Source code in vimms/Controller/box.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | |
__init__(ionisation_mode, isolation_width, N, mz_tol, rt_tol, min_ms1_intensity, roi_params, grid, smartroi_params=None, min_roi_length_for_fragmentation=0, ms1_shift=0, advanced_params=None, register_all_roi=False, scoring_params=GRID_CONTROLLER_SCORING_PARAMS, exclusion_method=ROI_EXCLUSION_DEW, exclusion_t_0=None)
Create a grid controller.
| Parameters: |
|
|---|
Source code in vimms/Controller/box.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | |
TopNExclusion
A class that perform standard dynamic exclusion for Top-N. This is based on checked whether an m/z and RT value lies in certain exclusion boxes.
Source code in vimms/Exclusion.py
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 | |
__init__(mz_tol, rt_tol, exclude_after_n_times=1, exclude_t0=0, initial_exclusion_list=None)
Initialise a Top-N dynamic exclusion object
| Parameters: |
|
|---|
Source code in vimms/Exclusion.py
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 | |
is_excluded(mz, rt)
Checks if a pair of (mz, rt) value is currently excluded by dynamic exclusion window
| Parameters: |
|
|---|
Returns: True if excluded (with weight 0.0), False otherwise (weight 1.0).
Source code in vimms/Exclusion.py
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 | |
update(current_scan, ms2_tasks)
For every scheduled MS2 scan, add its precursor m/z for initial exclusion check A tolerance of initial_t0 is used
| Parameters: |
|
|---|
Returns: None
Source code in vimms/Exclusion.py
327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | |
TopN_RoiController
Bases: RoiController
A ROI-based controller that implements the Top-N selection.
Source code in vimms/Controller/roi.py
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 | |
__init__(ionisation_mode, isolation_width, N, mz_tol, rt_tol, min_ms1_intensity, roi_params, min_roi_length_for_fragmentation=0, ms1_shift=0, advanced_params=None, exclusion_method=ROI_EXCLUSION_DEW, exclusion_t_0=None)
Initialise the Top-N SmartROI controller.
| Parameters: |
|
|---|
Source code in vimms/Controller/roi.py
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 | |
TopN_SmartRoiController
Bases: RoiController
A ROI-based controller that implements the Top-N selection with SmartROI rules. This is used in the paper 'Rapid Development ...'
Source code in vimms/Controller/roi.py
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | |
__init__(ionisation_mode, isolation_width, N, mz_tol, rt_tol, min_ms1_intensity, roi_params, smartroi_params, min_roi_length_for_fragmentation=0, ms1_shift=0, advanced_params=None, exclusion_method=ROI_EXCLUSION_DEW, exclusion_t_0=None)
Initialise the Top-N SmartROI controller.
| Parameters: |
|
|---|
Source code in vimms/Controller/roi.py
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 | |
WeightedDEWController
Bases: TopNController
A variant of the Top-N controller, but it uses a linear weight for dynamic exclusion window rather than a True/False indicator on whether a certain precursor ion is excluded or not. For more details, refer to our paper.
Source code in vimms/Controller/topN.py
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 | |
WeightedDEWExclusion
Bases: TopNExclusion
A class that perform weighted dynamic exclusion for Top-N. This is further described in our paper 'Rapid Development ...'
Source code in vimms/Exclusion.py
377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 | |
__init__(mz_tol, rt_tol, exclusion_t_0)
Initialises a weighted dynamic exclusion object Args: rt_tol: the RT tolerance (in seconds) exclusion_t_0: WeightedDEW parameter
Source code in vimms/Exclusion.py
383 384 385 386 387 388 389 390 391 392 393 | |
WeightedDEWFilter
Bases: ScoreFilter
A class that implements weighted dynamic exclusion filter
Source code in vimms/Exclusion.py
517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 | |
__init__(exclusion)
Initialises a weighted dynamic exclusion filter
| Parameters: |
|
|---|
Source code in vimms/Exclusion.py
522 523 524 525 526 527 528 529 | |
filter(current_rt, rois)
Check whether ROIs are excluded or not based on weighted dynamic exclusion filter Args: current_rt: the current RT value rois: a list of vimms.Roi.Roi objects.
Returns: a numpy array of weights for each ROI.
Source code in vimms/Exclusion.py
531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 | |
WrapperController
Bases: Controller
Template for controller which wraps behaviour of at least one other controller.
Source code in vimms/Controller/base.py
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 | |
create_if_not_exist(out_dir)
Creates a directory if it doesn't already exist Args: out_dir: the directory to create, if it doesn't exist
Returns: None.
Source code in vimms/Common.py
428 429 430 431 432 433 434 435 436 437 438 439 | |
create_targets_from_toxid(toxid_file_name, file_rt_units='minutes', mz_delta=10, rt_delta=60.0, polarity_filter=['+'], adducts_to_use=['[M+H]+', '[M+K]+', '[M+Na]+'])
Note: mz_delta is in ppm
Source code in vimms/Controller/targeted.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | |
get_dda_scan_param(mz, intensity, precursor_scan_id, isolation_width, mz_tol, rt_tol, agc_target=DEFAULT_MS2_AGC_TARGET, max_it=DEFAULT_MS2_MAXIT, collision_energy=DEFAULT_MS2_COLLISION_ENERGY, source_cid_energy=DEFAULT_SOURCE_CID_ENERGY, orbitrap_resolution=DEFAULT_MS2_ORBITRAP_RESOLUTION, mass_analyser=DEFAULT_MS2_MASS_ANALYSER, activation_type=DEFAULT_MS1_ACTIVATION_TYPE, isolation_mode=DEFAULT_MS2_ISOLATION_MODE, polarity=POSITIVE, metadata=None, scan_id=None)
Generate the default MS2 scan parameters.
| Parameters: |
|
|---|
Returns: the parameters of the MS2 scan to create
Source code in vimms/Common.py
768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 | |
get_default_scan_params(polarity=POSITIVE, agc_target=DEFAULT_MS1_AGC_TARGET, max_it=DEFAULT_MS1_MAXIT, collision_energy=DEFAULT_MS1_COLLISION_ENERGY, source_cid_energy=DEFAULT_SOURCE_CID_ENERGY, orbitrap_resolution=DEFAULT_MS1_ORBITRAP_RESOLUTION, default_ms1_scan_window=DEFAULT_MS1_SCAN_WINDOW, mass_analyser=DEFAULT_MS1_MASS_ANALYSER, activation_type=DEFAULT_MS1_ACTIVATION_TYPE, isolation_mode=DEFAULT_MS1_ISOLATION_MODE, metadata=None, scan_id=None)
Generate the default MS1 scan parameters.
| Parameters: |
|
|---|
Returns: the parameters of the MS1 scan to create
Source code in vimms/Common.py
714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 | |