Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
JPatrickPett committed Oct 4, 2023
1 parent 608900b commit c21746b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions snp2cell/snp2cell_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import re
import textwrap
from pathlib import Path
from typing import Union, Optional, Any, Callable, Iterable

import dill
import matplotlib.pyplot as plt
Expand Down Expand Up @@ -220,7 +221,7 @@ def propagate_scores(self, score_keys, num_cores=None, log=logging.getLogger()):
@add_logger()
def rand_sim(
self,
score_key="score",
score_key: Union[str, list[str]] = "score",
perturb_key=None,
n=1000,
num_cores=None,
Expand Down Expand Up @@ -251,7 +252,11 @@ def rand_sim(
)

@add_logger()
def add_score_statistics(self, score_keys="score", log=logging.getLogger()):
def add_score_statistics(
self,
score_keys: Union[str, list[str], dict[str, str]] = "score",
log=logging.getLogger(),
):
log.info(f"adding statistics for: {score_keys}")
if isinstance(score_keys, str):
score_keys = [score_keys]
Expand Down Expand Up @@ -383,7 +388,7 @@ def adata_add_de_scores(
if "method" in kwargs and kwargs["method"] == "logreg":
de_df = get_rank_df(self.adata)
else:
de_df = sc.get.rank_genes_groups_df(self.adata, group=None)
de_df = sc.get.rank_genes_groups_df(self.adata, group=None) # type: ignore

if rank_by == "abs":
log.info("ranking by up- and downregulation...")
Expand Down

0 comments on commit c21746b

Please sign in to comment.