pypath.inputs.hmdb.common.raw§
- pypath.inputs.hmdb.common.raw(dataset: Literal['metabolites', 'proteins'], schema: dict | None = None, head: int | None = None) list[dict] [source]§
Parse data from HMDB XML files.
- Parameters:
dataset – Either “metabolites” or “proteins”.
schema – The schema defines the fields to be parsed. By default, a schema covering nearly all fields in the HMDB XML is used. Likely you don’t need all the fields within one task: in this case see pypath.inputs.hmdb.METABOLITE_SCHEMA or 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 record. These dicts might be deeply nested, and the structure depends on the schema used.