pypath.inputs.hmdb.proteins.raw§

pypath.inputs.hmdb.proteins.raw(schema: dict | None = None, head: int | None = None) list[dict][source]§

Parse metabolite data from HMDB.

Parameters:
  • schema – The schema defines the fields to be parsed. By default, a schema covering nearly all fields in the HMDB metabolites XML is used. Likely you don’t need all the fields within one task: in this case see pypath.inputs.hmdb.PROTEINS_SCHEMA to see the full schema, and create your own that is restricted to your fields of interest.

  • head – Process the first N records only. Useful for peeking into the data.

Returns:

A list of dicts, each dict containing the data extracted from one protein record. These dicts might be deeply nested, and the structure depends on the schema used.