# Migration Map

`old/` is now legacy reference code. New notebooks should import from `sctk`.

| Old area | New API | Decision |
| --- | --- | --- |
| `old.pp.adata_process.scanpy_pp` | `sctk.pp.scanpy_preprocess` | Rewritten with stable layer names. |
| `old.pp.adata_process.layer_pp` | `sctk.pp.normalize_layer` | Rewritten without hidden permanent `.X` mutation. |
| `old.pp.clustering.leiden_parallel` | `sctk.pp.leiden_grid` | Rewritten with `n_jobs`. |
| `old.pp.cell_cycle.load_cell_cycle_genes` | `sctk.pp.cell_cycle_genes` | Rewritten with species aliases. |
| `old.pp.marker_genes.find_marker_genes_in_data` | `sctk.tl.markers_in_data` | Rewritten. |
| `old.pp.marker_genes.get_rank_genes_from_groups` | `sctk.tl.rank_genes_table`, `sctk.tl.marker_dict_from_rank_genes` | Rewritten with tidy output. |
| `old.utils._genes.gmt_to_dc` | `sctk.tl.read_gmt` | Rewritten with default `source/target` columns. |
| `old.tl.pseudobulk_DEG.create_pseudo_bulk` | `sctk.tl.create_pseudobulk` | Uses current decoupler pseudobulk API. |
| `old.tl.pseudobulk_DEG.run_deseq2` | `sctk.tl.run_deseq2` | Rewritten around pydeseq2. |
| `old.utils._ora`, `old.utils._memento` enrichment helpers | `sctk.tl.run_ora`, `sctk.tl.run_gsea` | Uses offline `gseapy.enrich` for ORA and `gseapy.prerank` for GSEA. |
| `old.pl._color` | `sctk.pl.palettes`, `sctk.pl.set_colors`, `sctk.pl.get_colors` | Not migrated; replaced with lightweight palettes. |
| `old.pl.plotcluster` | `sctk.pl.composition` | Rewritten. |
| `old.pl.gene_enrich` | `sctk.pl.volcano`, `sctk.pl.enrichment_dotplot`, `sctk.pl.enrichment_barplot` | Rewritten. |
| `old.r.pp.scDblFinder` | `sctk.r.pp.scdblfinder` | Rewritten with lazy R backend. |
| `old.r.pp.remove_ambient` | `sctk.r.pp.remove_ambient` | Rewritten with lazy R backend. |
| `old.utils._survival` | None | Out of core scope. |
| `old.pl._dotplot` | `sctk.pl.dotplot` | Replaced by a lightweight Scanpy-backed wrapper. |
| `old.pl._cell_cell_communication` | `sctk.tl.run_liana`, `sctk.tl.summarize_interactions` | Replaced with a tidy LIANA-based analysis interface; bespoke legacy plotting was not ported. |
| `old.r.tl.CellChat/NicheNet/inferCNV` | None for now | Deferred heavy R wrappers. |
