Skip to content

Commit

Permalink
Coda plots docs with dict
Browse files Browse the repository at this point in the history
  • Loading branch information
Lilly-May committed Sep 6, 2024
1 parent 378121d commit fce6249
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
- os: ubuntu-latest
python: "3.12"
run_mode: "slow"
# - os: ubuntu-latest
# python: "3.12"
# run_mode: "fast"
# - os: ubuntu-latest
# python: "3.12"
# run_mode: "fast"
- os: ubuntu-latest
python: "3.12"
run_mode: slow
Expand Down
12 changes: 4 additions & 8 deletions pertpy/tools/_coda/_base_coda.py
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ def get_node_df(self, data: AnnData | MuData, modality_key: str = "coda"):
>>> key_added="lineage", add_level_name=True
>>> )
>>> mdata = tasccoda.prepare(
>>> mdata, formula="Health", reference_cell_type="automatic", tree_key="lineage", pen_args={"phi": 0}
>>> mdata, formula="Health", reference_cell_type="automatic", tree_key="lineage", pen_args={"phi" : 0}
>>> )
>>> tasccoda.run_nuts(mdata, num_samples=1000, num_warmup=100, rng_key=42)
>>> node_effects = tasccoda.get_node_df(mdata)
Expand Down Expand Up @@ -1843,9 +1843,6 @@ def plot_draw_tree( # pragma: no cover
tight_text: When False, boundaries of the text are approximated according to general font metrics,
producing slightly worse aligned text faces but improving the performance of tree visualization in scenes with a lot of text faces.
show_scale: Include the scale legend in the tree image or not.
show: If True, plot the tree inline. If false, return tree and tree_style objects.
file_name: Path to the output image file. Valid extensions are .SVG, .PDF, .PNG.
Output image can be saved whether show is True or not.
units: Unit of image sizes. “px”: pixels, “mm”: millimeters, “in”: inches.
figsize: Figure size.
dpi: Dots per inches.
Expand All @@ -1864,7 +1861,7 @@ def plot_draw_tree( # pragma: no cover
>>> key_added="lineage", add_level_name=True
>>> )
>>> mdata = tasccoda.prepare(
>>> mdata, formula="Health", reference_cell_type="automatic", tree_key="lineage", pen_args={"phi": 0}
>>> mdata, formula="Health", reference_cell_type="automatic", tree_key="lineage", pen_args=dict(phi=0)
>>> )
>>> tasccoda.run_nuts(mdata, num_samples=1000, num_warmup=100, rng_key=42)
>>> tasccoda.plot_draw_tree(mdata, tree="lineage")
Expand Down Expand Up @@ -1934,7 +1931,6 @@ def plot_draw_effects( # pragma: no cover
tight_text: When False, boundaries of the text are approximated according to general font metrics,
producing slightly worse aligned text faces but improving the performance of tree visualization in scenes with a lot of text faces.
show_scale: Include the scale legend in the tree image or not.
file_name: Path to the output image file. valid extensions are .SVG, .PDF, .PNG. Output image can be saved whether show is True or not.
units: Unit of image sizes. “px”: pixels, “mm”: millimeters, “in”: inches.
figsize: Figure size.
dpi: Dots per inches.
Expand All @@ -1954,7 +1950,7 @@ def plot_draw_effects( # pragma: no cover
>>> key_added="lineage", add_level_name=True
>>> )
>>> mdata = tasccoda.prepare(
>>> mdata, formula="Health", reference_cell_type="automatic", tree_key="lineage", pen_args={"phi": 0}
>>> mdata, formula="Health", reference_cell_type="automatic", tree_key="lineage", pen_args=dict(phi=0)
>>> )
>>> tasccoda.run_nuts(mdata, num_samples=1000, num_warmup=100, rng_key=42)
>>> tasccoda.plot_draw_effects(mdata, covariate="Health[T.Inflamed]", tree="lineage")
Expand Down Expand Up @@ -2151,7 +2147,7 @@ def plot_effects_umap( # pragma: no cover
>>> modality_key="coda",
>>> reference_cell_type="18",
>>> formula="condition",
>>> pen_args={"phi": 0, "lambda_1": 3.5},
>>> pen_args=dict(phi=0, lambda_1=3.5),
>>> tree_key="tree"
>>> )
>>> tasccoda_model.run_nuts(
Expand Down

0 comments on commit fce6249

Please sign in to comment.