PangenomeInfoExtractor#
- class panorama.info.info.PangenomeInfoExtractor(disable_bar=False)#
Bases:
objectA class to extract and process information from pangenome HDF5 files.
This class handles the extraction of status, content, parameters, and metadata information from multiple pangenome files and provides methods to export this information as interactive HTML reports.
- __init__(disable_bar=False)#
Initialize the PangenomeInfoExtractor.
- Parameters:
disable_bar (
bool) – Whether to disable the progress bar during processing.
- static _extract_content(h5f)#
Extract content information from an HDF5 file.
- Parameters:
h5f (
File) – Open HDF5 file handle.- Returns:
Dict[str, Any] – Content information.
- Return type:
Dict[str,Any]
- static _extract_metadata(h5f)#
Extract metadata information from an HDF5 file.
- Parameters:
h5f (
File) – Open HDF5 file handle.- Returns:
Dict[str, Any] – Metadata information.
- Return type:
Dict[str,Any]
- static _extract_parameters(h5f)#
Extract parameter information from an HDF5 file.
- Parameters:
h5f (
File) – Open HDF5 file handle.- Returns:
Dict[str, Any] – Parameter information.
- Return type:
Dict[str,Any]
Note
This method currently prints parameters for debugging but doesn’t return them. Implementation needs to be completed.
- static _extract_status(h5f)#
Extract status information from an HDF5 file.
- Parameters:
h5f (
File) – Open HDF5 file handle.- Returns:
Dict[str, Union[bool, str]] – Status information.
- Return type:
Dict[str,Union[bool,str]]
- extract_info(pangenomes_path, status=False, content=False, parameters=False, metadata=False)#
Extract information from multiple pangenome files.
- Parameters:
pangenomes_path (
Dict[str,Dict[str,Union[str,int]]]) – Dictionary mapping pangenome names to their file paths.status (
bool) – Whether to extract status information. Defaults to False.content (
bool) – Whether to extract content information. Defaults to False.parameters (
bool) – Whether to extract parameter information. Defaults to False.metadata (
bool) – Whether to extract metadata information. Defaults to False.
- Returns:
InfoDict – Dictionary containing all extracted information organized by type.
- Return type:
Dict[str,Dict[str,Any]]
Note
If no specific information type is requested, all types will be extracted.