gctree.isotyping.explode_idmap

gctree.isotyping.explode_idmap(idmap, isotype_map)[source]

Uses provided mapping of original sequence IDs to observed isotypes to ‘explode’ the provided mapping of unique sequence IDs to original sequence IDs.

Parameters:
  • idmap (Dict[str, Set[str]]) – A dictionary mapping unique sequence IDs to sets of original IDs of observed sequences

  • isotype_map (Dict[str, str]) – A dictionary mapping original IDs to observed isotype names

Return type:

Dict[str, Dict[str, Set[str]]]

Returns:

A dictionary mapping unique sequence IDs to dictionaries, mapping isotype names to sets of original sequence IDs.