omicverse.bulk.Matrix_ID_mapping

omicverse.bulk.Matrix_ID_mapping(data, gene_ref_path, keep_unmapped=True)[source]

Map gene IDs in the input data to gene symbols using a reference table.

Parameters:
  • data (DataFrame) – The input data containing gene IDs as index.

  • gene_ref_path (str) – The path to the reference table containing the mapping from gene IDs to gene symbols.

  • keep_unmapped (bool (default: True)) – Whether to keep genes that are not found in the mapping table. If True, unmapped genes retain their original IDs. If False, unmapped genes are removed (original behavior). Default: True.

Returns:

The input data with gene IDs mapped to gene symbols.

Return type:

data