mh_utils.worklist_parser.parser

MassHunter worklist parser.

Functions:

parse_datetime(the_date)

Parse a datetime from a worklist or contents file.

parse_params(element)

Parse the worklist execution parameters from XML.

parse_sample_info(element[, user_columns])

Parse information about a sample in a worklist from XML.

Data:

sample_info_tags

Mapping of XML tag names to attribute names.

parse_datetime(the_date)[source]

Parse a datetime from a worklist or contents file.

Parameters

the_date (str) – The date and time as a string in the format %Y-%m-%dT%H:%M:%S%z.

Return type

datetime

parse_params(element)[source]

Parse the worklist execution parameters from XML.

Parameters

element (ObjectifiedElement)

Return type

Dict[str, Any]

Returns

Mapping of keys to parameter values.

parse_sample_info(element, user_columns=None)[source]

Parse information about a sample in a worklist from XML.

Parameters
  • element (ObjectifiedElement) – The XML element to parse the data from

  • user_columns (Optional[Dict[str, Column]]) – Optional mapping of user column labels to Column objects. Default None.

Return type

Dict[str, Any]

sample_info_tags

Mapping of XML tag names to attribute names.