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
Attributefrom a dictionary.from_xml(element)Construct an
Attributeobject from an XML element.to_dict([convert_values])Returns a dictionary containing the contents of the
Attributeobject.-
attribute_type Type:
AttributeTypeThe attribute type identifier.
Can be System Defined (
0), System Used (1), or User Added (2).
-
field_type Type:
intThe 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
Checksumfrom a dictionary.from_xml(element)Construct a
Checksumobject from an XML element.to_dict([convert_values])Returns a dictionary containing the contents of the
Checksumobject.
-
class
JobData(id, job_type, run_status, sample_info=None)[source] Bases:
DictableRepresents an entry in the worklist.
- Parameters
Methods:
from_xml(element[, user_columns])Construct a
JobDataobject from an XML element.to_dict()Return a dictionary representation of the class.
-
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
Macrofrom a dictionary.from_xml(element)Construct a
Macroobject from an XML element.to_dict([convert_values])Returns a dictionary containing the contents of the
Macroobject.-
classmethod
from_xml(element)[source] Construct a
Macroobject from an XML element.- Parameters
element (
ObjectifiedElement)- Return type
-
class
Worklist(version, locked_run_mode, instrument_name, params, user_columns, jobs, checksum)[source] Bases:
XMLFileMixin,DictableClass 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
Worklistas apandas.DataFrame.from_xml(element)Construct a
Worklistobject from an XML element.to_dict()Return a dictionary representation of the class.
-
as_dataframe()[source] Returns the
Worklistas apandas.DataFrame.- Return type