Skip to content

Commit 99e41ab

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent e8a7288 commit 99e41ab

9 files changed

Lines changed: 339 additions & 291 deletions

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
Package for the analysis of transcripts outside segmented cells in python
1010

11-
1211
![Alt text][images/logo_fish.png]
1312

1413
## Getting started
@@ -37,8 +36,8 @@ pip install troutpy
3736
pip install git+https://github.com/theislab/troutpy.git@main
3837
```
3938

40-
4139
## Usage
40+
4241
Please have a look at the [Usage documentation](https://troutpy.readthedocs.io/en/latest/) and the [tutorials](https://troutpy.readthedocs.io/en/latest/).
4342

4443
```python

notebooks/spatialdata_tutorials/0_format_Xenium_sdata.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@
4242
}
4343
],
4444
"source": [
45-
"import spatialdata_io\n",
4645
"import spatialdata as sd\n",
46+
"import spatialdata_io\n",
47+
"\n",
4748
"import troutpy"
4849
]
4950
},
@@ -244,7 +245,7 @@
244245
"outputs": [],
245246
"source": [
246247
"xenium_path_cropped = \"/media/sergio/Meninges/troutpy/xenium_msbrain/mousebrain_prime_crop_communication.zarr\"\n",
247-
"sdata=sd.read_zarr(xenium_path_cropped)"
248+
"sdata = sd.read_zarr(xenium_path_cropped)"
248249
]
249250
},
250251
{
@@ -387,7 +388,7 @@
387388
}
388389
],
389390
"source": [
390-
"converted_sdata['transcripts']"
391+
"converted_sdata[\"transcripts\"]"
391392
]
392393
},
393394
{

notebooks/spatialdata_tutorials/1_segmentation.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"source": [
4141
"import scanpy as sc\n",
4242
"import sopa\n",
43-
"import spatialdata as sd\n"
43+
"import spatialdata as sd"
4444
]
4545
},
4646
{

notebooks/spatialdata_tutorials/2_run_segmentation_free.ipynb

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
],
4242
"source": [
4343
"import spatialdata as sd\n",
44+
"\n",
4445
"import troutpy"
4546
]
4647
},
@@ -332,9 +333,7 @@
332333
"metadata": {},
333334
"outputs": [],
334335
"source": [
335-
"troutpy.pp.segmentation_free_sainsc(sdata,binsize=3,celltype_key='leiden',\n",
336-
" background_filter=0.4,gaussian_kernel_key=2.5,\n",
337-
" n_threads=16)"
336+
"troutpy.pp.segmentation_free_sainsc(sdata, binsize=3, celltype_key=\"leiden\", background_filter=0.4, gaussian_kernel_key=2.5, n_threads=16)"
338337
]
339338
},
340339
{
@@ -352,10 +351,7 @@
352351
"metadata": {},
353352
"outputs": [],
354353
"source": [
355-
"troutpy.pp.define_extracellular(\n",
356-
" sdata,layer = \"transcripts\",method= \"sainsc\",\n",
357-
" unassigned_tag = \"UNASSIGNED\",\n",
358-
" copy = False, percentile_threshold = 2)"
354+
"troutpy.pp.define_extracellular(sdata, layer=\"transcripts\", method=\"sainsc\", unassigned_tag=\"UNASSIGNED\", copy=False, percentile_threshold=2)"
359355
]
360356
},
361357
{
@@ -383,7 +379,7 @@
383379
}
384380
],
385381
"source": [
386-
"troutpy.pl.pie(sdata, groupby=\"extracellular\",group_key='overlaps_cell')"
382+
"troutpy.pl.pie(sdata, groupby=\"extracellular\", group_key=\"overlaps_cell\")"
387383
]
388384
},
389385
{
@@ -412,7 +408,7 @@
412408
}
413409
],
414410
"source": [
415-
"troutpy.pl.crosstab(sdata,yvar='extracellular',xvar='overlaps_cell',normalize=True, cmap='troutpy',kind='barh',stacked=True)"
411+
"troutpy.pl.crosstab(sdata, yvar=\"extracellular\", xvar=\"overlaps_cell\", normalize=True, cmap=\"troutpy\", kind=\"barh\", stacked=True)"
416412
]
417413
},
418414
{
@@ -432,7 +428,7 @@
432428
}
433429
],
434430
"source": [
435-
"troutpy.pl.crosstab(sdata,yvar='extracellular',xvar='overlaps_cell',normalize=True, cmap='Aquas',kind='heatmap',stacked=True)"
431+
"troutpy.pl.crosstab(sdata, yvar=\"extracellular\", xvar=\"overlaps_cell\", normalize=True, cmap=\"Aquas\", kind=\"heatmap\", stacked=True)"
436432
]
437433
}
438434
],

0 commit comments

Comments
 (0)