Skip to content

Commit

Permalink
Merge pull request #206 from DendrouLab/sarah_matplotlib
Browse files Browse the repository at this point in the history
Small fixes
  • Loading branch information
bio-la authored Mar 5, 2024
2 parents 21785ba + 6437200 commit 140f182
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Panpipes allows reliable and customisable analysis and evaluation of individual

**See our [documentation](https://panpipes-pipelines.readthedocs.io/en/latest/) and our [preprint](https://www.biorxiv.org/content/10.1101/2023.03.11.532085v2)**

These workflows make use of [cgat-core](https://github.com/cgat-developers/cgat-core):
These workflows make use of [cgat-core](https://github.com/cgat-developers/cgat-core)

Available workflows:

Expand Down
4 changes: 2 additions & 2 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ conda config --add channels conda-forge
conda config --set channel_priority strict
# you should remove the strict priority afterwards!
conda search r-base
conda create --name pipeline_env python=3.9 r-base=4.3.0
conda create --name pipeline_env python=3.10 r-base=4.3.0
```

now we activate the environment
Expand All @@ -28,7 +28,7 @@ conda activate pipeline_env
Let's first install the R packages

```bash
conda install -c conda-forge r-tidyverse r-optparse r-ggforce r-ggraph r-xtable r-hdf5r r-clustree
conda install -c conda-forge r-tidyverse r-optparse r-ggforce r-ggraph r-xtable r-hdf5r r-clustree r-cowplot
```

Then we can install panpipes:
Expand Down
2 changes: 1 addition & 1 deletion panpipes/panpipes/pipeline_preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def prot_preprocess( log_file, scaled_file, ):
if PARAMS['prot_solver'] == "default":
cmd += " --pca_solver arpack"
else:
cmd += " --pca_solver %(pca_solver)s"
cmd += " --pca_solver %(prot_solver)s"
cmd += """
--run_pca True
--n_pcs %(prot_n_pcs)s
Expand Down
7 changes: 5 additions & 2 deletions panpipes/python_scripts/plot_features_scatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,18 @@

L.info(args)

sc.settings.figdir = "./scatters/"
figdir = "./scatters/"
if not os.path.exists(figdir):
os.mkdir(figdir)

sc.settings.figdir = figdir
sc.set_figure_params(fontsize=12)


mdata = mu.read(args.mdata_object)

layers = read_yaml(args.layers_dict)


df = pd.read_csv(args.scatters_csv)
L.debug(df)

Expand Down
2 changes: 1 addition & 1 deletion panpipes/python_scripts/run_scanpyQC_spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
percent_top = [x for x in percent_top if x <= spatial.n_vars]
sc.pp.calculate_qc_metrics(spatial, qc_vars=qc_vars, percent_top=percent_top, inplace=True)

if args.spatial_filetype == "vizgen":
if (args.spatial_filetype == "vizgen") and ("blank_genes" in spatial.obsm):
spatial.obsm["blank_genes"].to_numpy().sum() / spatial.var["total_counts"].sum() * 100

# Calculate cc scores
Expand Down
1 change: 1 addition & 0 deletions pipeline_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dependencies:
- r-optparse
- r-tidyverse
- r-xtable
- r-cowplot
- pip
- pip:
- pytest

0 comments on commit 140f182

Please sign in to comment.