mh_utils.worklist_parser.classes¶
Main classes for the worklist paser.
Classes:
|
Represents an Attribute. |
|
Represents a checksum for a worklist. |
|
Class that 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]¶ Bases:
objectRepresents an Attribute.
- Parameters
attribute_id
attribute_type – Can be System Defined (
0), System Used (1), or User Added (2).field_type – 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.
system_name
header_name
data_type
default_data_value
reorder_id
show_hide_status
column_width
Attributes:
Can be System Defined (
0), System Used (1), or User Added (2).Each of the system defined columns have a field type starting from sampleid = 0 to reserved6 = 24.
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:
AttributeTypeCan be System Defined (
0), System Used (1), or User Added (2).
-
field_type¶ Type:
intEach 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]¶ Bases:
objectRepresents a checksum for a worklist.
The format of the checksum is unknown.
- Parameters
SchemaVersion
ALGO_VERSION
HASHCODE
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:
DictableClass that represents an entry in the worklist.
- Parameters
Methods:
__repr__()Return a string representation of the
Dictable.from_xml(element[, user_columns])Construct a
JobDataobject from an XML element.
-
class
Macro(project_name, procedure_name, input_parameter, output_data_type, output_parameter, display_string)[source]¶ Bases:
objectRepresents a macro in a worklist.
- Parameters
project_name
procedure_name
input_parameter
output_data_type
output_parameter
display_string
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.
-
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 repr(self).
Returns the
Worklistas apandas.DataFrame.from_xml(element)Construct a
Worklistobject from an XML element.-
as_dataframe()[source]¶ Returns the
Worklistas apandas.DataFrame.- Return type