omicverse.bulk.Matrix_ID_mapping#
- omicverse.bulk.Matrix_ID_mapping(data, gene_ref_path, keep_unmapped=True, auto_download=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.auto_download (
bool(default:True)) – If the reference atgene_ref_pathis missing AND its basename matches a known omicverse pair (pair_GRCh38.tsv,pair_GRCh37.tsv,pair_GRCm39.tsv,pair_danRer11.tsv), callov.utils.download_geneid_annotation_pair()to fetch the standard pairs into./genesets/and resolve from there.
- Returns:
The input data with gene IDs mapped to gene symbols.
- Return type:
data