mh_utils.worklist_parser.classes
Main classes for the worklist parser.
Classes:
|
Represents an Attribute. |
|
Represents a checksum for a worklist. |
|
Represents an entry in the worklist. |
|
Represents a macro in a worklist. |
|
Class that represents an Agilent MassHunter worklist. |
-
class
Attribute
(attribute_id, attribute_type, field_type, system_name, header_name, data_type, default_data_value, reorder_id, show_hide_status, column_width)[source] Represents an Attribute.
- Parameters
Attributes:
The attribute type identifier.
The field type identifier.
Methods:
from_dict
(d)Construct an instance of
Attribute
from a dictionary.from_xml
(element)Construct an
Attribute
object from an XML element.to_dict
([convert_values])Returns a dictionary containing the contents of the
Attribute
object.-
attribute_type
Type:
AttributeType
The attribute type identifier.
Can be System Defined (
0
), System Used (1
), or User Added (2
).
-
field_type
Type:
int
The field type identifier.
Each of the system defined columns have a field type starting from sampleid = 0 to reserved6 = 24.
The system used column can be ‘compound param’ = 35, ‘optim param’ = 36, ‘mass param’ = 37 and ‘protein param’ = 38.
The User added columns start from 45.
-
class
Checksum
(SchemaVersion, ALGO_VERSION, HASHCODE)[source] Represents a checksum for a worklist.
The format of the checksum is unknown.
Attributes:
Methods:
from_dict
(d)Construct an instance of
Checksum
from a dictionary.from_xml
(element)Construct a
Checksum
object from an XML element.to_dict
([convert_values])Returns a dictionary containing the contents of the
Checksum
object.
-
class
JobData
(id, job_type, run_status, sample_info=None)[source] Bases:
Dictable
Represents an entry in the worklist.
- Parameters
Methods:
from_xml
(element[, user_columns])Construct a
JobData
object from an XML element.
-
class
Macro
(project_name, procedure_name, input_parameter, output_data_type, output_parameter, display_string)[source] Represents a macro in a worklist.
- Parameters
Attributes:
Returns whether the macro is undefined.
Methods:
from_dict
(d)Construct an instance of
Macro
from a dictionary.from_xml
(element)Construct a
Macro
object from an XML element.to_dict
([convert_values])Returns a dictionary containing the contents of the
Macro
object.
-
class
Worklist
(version, locked_run_mode, instrument_name, params, user_columns, jobs, checksum)[source] Bases:
XMLFileMixin
,Dictable
Class that represents an Agilent MassHunter worklist.
- Parameters
version (
float
) – WorklistInfo version numberlocked_run_mode (
bool
) – Flag to indicate whether the data was acquired in locked mode. Yes = -1. No = 0.instrument_name (
str
) – The name of the instrument.params (
dict
) – Mapping of parameter names to values. TODO: Checkuser_columns (
dict
) – Mapping of user columns to ??? TODOchecksum (
Checksum
) – The checksum of the worklist file. The format is unknown.
Methods:
__repr__
()Return a string representation of the
Worklist
.Returns the
Worklist
as apandas.DataFrame
.from_xml
(element)Construct a
Worklist
object from an XML element.-
as_dataframe
()[source] Returns the
Worklist
as apandas.DataFrame
.- Return type