Documentation for Agent.py
¶
Agent
¶
AbstractAgent
¶
AbstractAgent()
Bases: ABC
An abstract class to represent an Agent.
Agents has a scope outside the controller, and it can be handy way to enable a controller that has a global state across runs.
Source code in vimms/Agent.py
18 19 |
|
act
abstractmethod
¶
act(scan_to_process)
Acts on a scan
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scan_to_process
|
the scan to process |
required |
Source code in vimms/Agent.py
51 52 53 54 55 56 57 58 |
|
next_tasks
abstractmethod
¶
next_tasks(scan_to_process, controller, current_task_id)
Schedule the next action
Subclasses should implement this to handle scans in the appropriate way.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scan_to_process
|
Scan
|
the next scan to process |
required |
controller
|
Controller
|
parent controller class for this agent |
required |
current_task_id
|
int
|
the current task ID |
required |
Returns:
Type | Description |
---|---|
tuple
|
a tuple containing: new_tasks(vimms.Common.ScanParameters): a list of new tasks to run current_task_id (int): the id of the current task next_processed_scan_id (int): the id of the next incoming scan to process |
Source code in vimms/Agent.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
reset
abstractmethod
¶
reset()
Reset the internal state of this Agent
Source code in vimms/Agent.py
60 61 62 63 |
|
update
abstractmethod
¶
update(last_scan, controller)
Updates agent internal state based on the last scan
Parameters:
Name | Type | Description | Default |
---|---|---|---|
last_scan
|
the last scan that has been processed |
required | |
controller
|
the parent controller class that contains this agent |
required |
Source code in vimms/Agent.py
41 42 43 44 45 46 47 48 49 |
|
FullScanAgent
¶
FullScanAgent()
Bases: AbstractAgent
Create a full-scan agent that performs only MS1 scans.
Source code in vimms/Agent.py
67 68 69 |
|
TopNDEWAgent
¶
TopNDEWAgent(
ionisation_mode,
N,
isolation_width,
mz_tol,
rt_tol,
min_ms1_intensity,
exclude_after_n_times=1,
exclude_t0=0,
)
Bases: AbstractAgent
Create a Top-N agent that performs the standard Top-N fragmentation typically seen in Data-Dependant Acquisition (DDA) process.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ionisation_mode
|
string
|
the ionisation mode, either POSITIVE or NEGATIVE. |
required |
N
|
int
|
the number of top-N most intense precursors to fragment. |
required |
isolation_width
|
float
|
the isolation width, in Dalton. |
required |
mz_tol
|
float
|
m/z tolerance for dynamic exclusion |
required |
rt_tol
|
float
|
retention time tolerance (in seconds) for dynamic exclusion. |
required |
min_ms1_intensity
|
float
|
the minimum intensity of MS1 (precursor) peak to fragment. |
required |
Source code in vimms/Agent.py
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 |
|