Skip to content

Commit

Permalink
Merge pull request #636 from Sichao25/debug_l
Browse files Browse the repository at this point in the history
Support `Index` input for parameter `genes` in  `kinetic_heatmap()`
  • Loading branch information
Xiaojieqiu committed Dec 13, 2023
2 parents 4514a09 + f460c80 commit 1aa631b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion dynamo/plot/time_series.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# include pseudotime and predict cell trajectory
from typing import Any, Dict, List, Optional, Tuple, Union

import pandas as pd

try:
from typing import Literal
except ImportError:
Expand Down Expand Up @@ -180,7 +182,7 @@ def kinetic_curves(
@docstrings.with_indent(4)
def kinetic_heatmap(
adata: AnnData,
genes: List[str],
genes: Union[List[str], pd.Index],
mode: str = "vector_field",
basis: Optional[str] = None,
layer: str = "X",
Expand Down
3 changes: 2 additions & 1 deletion dynamo/prediction/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,8 @@ def arclength_sampling_n(X, num, t=None):
# ---------------------------------------------------------------------------------------------------
# fate related
def fetch_exprs(adata, basis, layer, genes, time, mode, project_back_to_high_dim, traj_ind):
import pandas as pd
if type(genes) != list:
genes = list(genes)

prefix = "LAP_" if mode.lower() == "lap" else "fate_"
if basis is not None:
Expand Down

0 comments on commit 1aa631b

Please sign in to comment.