Pipeline
Utilities for metadata dictionaries and phenotype list processing.
metadata()
phenofhy.pipeline.metadata()Load metadata dictionary files into DataFrames.
Returns
out: dict[str, pandas.DataFrame]
Dictionary with codings, data_dictionary, and entity_dictionary.
Raises
RuntimeError: Exception
If a required file is missing or fails to load.
FileNotFoundError: Exception
If an expected file path does not exist.
field_list()
phenofhy.pipeline.field_list(fields=None, output_file=None, fields_list_name=None,
input_file=None, input_file_name=None)Build a merged metadata table from a phenotype list.
Parameters
fields: list[str] | dict[str, str] | str | None
List of "entity.field", dict of entity->field, or path/ID.
output_file: str | None
If provided, write CSV to this path and return None.
fields_list_name: str | None
Optional filename when downloading a direct file ID.
input_file: any
Backward-compatible alias for fields.
input_file_name: str | None
Backward-compatible alias for fields_list_name.
Returns
out: pandas.DataFrame | None
Merged metadata table, or None if output_file is provided.
Example
from phenofhy import pipeline
meta = pipeline.metadata()
fields = pipeline.field_list(fields=["participant.birth_year", "participant.birth_month"])