pmotools.pmo_builder.merge_to_pmo module

pmotools.pmo_builder.merge_to_pmo.merge_to_pmo(mhap_info: dict, panel_target_info: dict, specimen_info: list | None = None, library_sample_info: list | None = None, sequencing_info: list | None = None, bioinfo_method_info: list | None = None, bioinfo_run_info: list | None = None, project_info: list | None = None, read_counts_by_stage_info: list | None = None)[source]

Merge components into PMO, replacing names with indices.

The required input are mhap_info (must have fields:detected_microhaplotypes and representative_microhaplotypes) and panel_target_info (must have fields: target_info and panel_info). If no library_sample_info or specimen_info are provided, they will be automatically generated from the detected_microhaplotypes. Is also possible to provide only specimen_info or library_sample_info but their names must match up with the detected_microhaplotypes names.

Parameters:
  • mhap_info (dict) – microhaplotypes within this project, both detected and representative; must contain detected_microhaplotypes and representative_microhaplotypes.

  • panel_target_info (dict) – panel and target information; must contain target_info and panel_info.

  • specimen_info (list, optional) – all the specimens within this project.

  • library_sample_info (list, optional) – library samples within this project.

  • sequencing_info (list, optional) – sequencing info for this project.

  • bioinfo_method_info (list, optional) – bioinformatics pipeline/methods.

  • bioinfo_run_info (list, optional) – runtime info for the pipeline.

  • project_info (list, optional) – info about projects stored in this PMO.

  • read_counts_by_stage_info (list, optional) – read counts by stage.

Returns:

a JSON-formatted PMO string.

Return type:

str