From 5f72a895e28a4ae07238838240e533d8434f9d19 Mon Sep 17 00:00:00 2001 From: <> Date: Fri, 24 Nov 2023 11:00:08 +0000 Subject: [PATCH] Deployed 2e4a0d9 with MkDocs version: 1.5.3 --- .nojekyll | 0 404.html | 566 ++ api/segmentation/shapes/index.html | 865 +++ api/stats/index.html | 1836 +++++ api/utils/data/index.html | 1088 +++ assets/_mkdocstrings.css | 64 + assets/images/favicon.png | Bin 0 -> 1870 bytes assets/javascripts/bundle.81fa17fe.min.js | 29 + assets/javascripts/bundle.81fa17fe.min.js.map | 7 + assets/javascripts/lunr/min/lunr.ar.min.js | 1 + assets/javascripts/lunr/min/lunr.da.min.js | 18 + assets/javascripts/lunr/min/lunr.de.min.js | 18 + assets/javascripts/lunr/min/lunr.du.min.js | 18 + assets/javascripts/lunr/min/lunr.el.min.js | 1 + assets/javascripts/lunr/min/lunr.es.min.js | 18 + assets/javascripts/lunr/min/lunr.fi.min.js | 18 + assets/javascripts/lunr/min/lunr.fr.min.js | 18 + assets/javascripts/lunr/min/lunr.he.min.js | 1 + assets/javascripts/lunr/min/lunr.hi.min.js | 1 + assets/javascripts/lunr/min/lunr.hu.min.js | 18 + assets/javascripts/lunr/min/lunr.hy.min.js | 1 + assets/javascripts/lunr/min/lunr.it.min.js | 18 + assets/javascripts/lunr/min/lunr.ja.min.js | 1 + assets/javascripts/lunr/min/lunr.jp.min.js | 1 + assets/javascripts/lunr/min/lunr.kn.min.js | 1 + assets/javascripts/lunr/min/lunr.ko.min.js | 1 + assets/javascripts/lunr/min/lunr.multi.min.js | 1 + assets/javascripts/lunr/min/lunr.nl.min.js | 18 + assets/javascripts/lunr/min/lunr.no.min.js | 18 + assets/javascripts/lunr/min/lunr.pt.min.js | 18 + assets/javascripts/lunr/min/lunr.ro.min.js | 18 + assets/javascripts/lunr/min/lunr.ru.min.js | 18 + assets/javascripts/lunr/min/lunr.sa.min.js | 1 + .../lunr/min/lunr.stemmer.support.min.js | 1 + assets/javascripts/lunr/min/lunr.sv.min.js | 18 + assets/javascripts/lunr/min/lunr.ta.min.js | 1 + assets/javascripts/lunr/min/lunr.te.min.js | 1 + assets/javascripts/lunr/min/lunr.th.min.js | 1 + assets/javascripts/lunr/min/lunr.tr.min.js | 18 + assets/javascripts/lunr/min/lunr.vi.min.js | 1 + assets/javascripts/lunr/min/lunr.zh.min.js | 1 + assets/javascripts/lunr/tinyseg.js | 206 + assets/javascripts/lunr/wordcut.js | 6708 +++++++++++++++++ .../workers/search.f886a092.min.js | 42 + .../workers/search.f886a092.min.js.map | 7 + assets/overview.png | Bin 0 -> 1890471 bytes assets/sopa.png | Bin 0 -> 33758 bytes assets/sopa_favicon.png | Bin 0 -> 1303 bytes assets/sopa_small_blue.png | Bin 0 -> 11205 bytes assets/sopa_small_white.png | Bin 0 -> 11144 bytes assets/stylesheets/main.4b4a2bd9.min.css | 1 + assets/stylesheets/main.4b4a2bd9.min.css.map | 1 + assets/stylesheets/palette.356b1318.min.css | 1 + .../stylesheets/palette.356b1318.min.css.map | 1 + cite_us/index.html | 593 ++ cli/index.html | 1512 ++++ css/custom.css | 9 + css/termynal.css | 110 + getting_started/index.html | 700 ++ index.html | 679 ++ js/custom.js | 105 + js/mathjax.js | 17 + js/termynal.js | 264 + objects.inv | Bin 0 -> 351 bytes pipeline/index.html | 761 ++ search/search_index.json | 1 + sitemap.xml | 3 + sitemap.xml.gz | Bin 0 -> 127 bytes toy/index.html | 727 ++ 69 files changed, 17190 insertions(+) create mode 100644 .nojekyll create mode 100644 404.html create mode 100644 api/segmentation/shapes/index.html create mode 100644 api/stats/index.html create mode 100644 api/utils/data/index.html create mode 100644 assets/_mkdocstrings.css create mode 100644 assets/images/favicon.png create mode 100644 assets/javascripts/bundle.81fa17fe.min.js create mode 100644 assets/javascripts/bundle.81fa17fe.min.js.map create mode 100644 assets/javascripts/lunr/min/lunr.ar.min.js create mode 100644 assets/javascripts/lunr/min/lunr.da.min.js create mode 100644 assets/javascripts/lunr/min/lunr.de.min.js create mode 100644 assets/javascripts/lunr/min/lunr.du.min.js create mode 100644 assets/javascripts/lunr/min/lunr.el.min.js create mode 100644 assets/javascripts/lunr/min/lunr.es.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.he.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hu.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hy.min.js create mode 100644 assets/javascripts/lunr/min/lunr.it.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ja.min.js create mode 100644 assets/javascripts/lunr/min/lunr.jp.min.js create mode 100644 assets/javascripts/lunr/min/lunr.kn.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ko.min.js create mode 100644 assets/javascripts/lunr/min/lunr.multi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.nl.min.js create mode 100644 assets/javascripts/lunr/min/lunr.no.min.js create mode 100644 assets/javascripts/lunr/min/lunr.pt.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ro.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ru.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sa.min.js create mode 100644 assets/javascripts/lunr/min/lunr.stemmer.support.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sv.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ta.min.js create mode 100644 assets/javascripts/lunr/min/lunr.te.min.js create mode 100644 assets/javascripts/lunr/min/lunr.th.min.js create mode 100644 assets/javascripts/lunr/min/lunr.tr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.vi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.zh.min.js create mode 100644 assets/javascripts/lunr/tinyseg.js create mode 100644 assets/javascripts/lunr/wordcut.js create mode 100644 assets/javascripts/workers/search.f886a092.min.js create mode 100644 assets/javascripts/workers/search.f886a092.min.js.map create mode 100644 assets/overview.png create mode 100644 assets/sopa.png create mode 100644 assets/sopa_favicon.png create mode 100644 assets/sopa_small_blue.png create mode 100644 assets/sopa_small_white.png create mode 100644 assets/stylesheets/main.4b4a2bd9.min.css create mode 100644 assets/stylesheets/main.4b4a2bd9.min.css.map create mode 100644 assets/stylesheets/palette.356b1318.min.css create mode 100644 assets/stylesheets/palette.356b1318.min.css.map create mode 100644 cite_us/index.html create mode 100644 cli/index.html create mode 100644 css/custom.css create mode 100644 css/termynal.css create mode 100644 getting_started/index.html create mode 100644 index.html create mode 100644 js/custom.js create mode 100644 js/mathjax.js create mode 100644 js/termynal.js create mode 100644 objects.inv create mode 100644 pipeline/index.html create mode 100644 search/search_index.json create mode 100644 sitemap.xml create mode 100644 sitemap.xml.gz create mode 100644 toy/index.html diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/404.html b/404.html new file mode 100644 index 00000000..7b40841d --- /dev/null +++ b/404.html @@ -0,0 +1,566 @@ + + + +
+ + + + + + + + + + + + + + +sopa.segmentation.shapes.solve_conflicts(cells, threshold=0.5, patch_indices=None, return_indices=False)
+
+Resolve segmentation conflicts (i.e. overlap) after running segmentation on patches
+ + + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
cells |
+
+ list[Polygon]
+ |
+
+
+
+ List of cell polygons + |
+ + required + | +
threshold |
+
+ float
+ |
+
+
+
+ When two cells are overlapping, we look at the area of intersection over the area of the smallest cell. If this value is higher than the |
+
+ 0.5
+ |
+
patch_indices |
+
+ ndarray | None
+ |
+
+
+
+ Patch from which each cell belongs. + |
+
+ None
+ |
+
return_indices |
+
+ bool
+ |
+
+
+
+ If |
+
+ False
+ |
+
Returns:
+Type | +Description | +
---|---|
+ ndarray[Polygon]
+ |
+
+
+
+ Array of resolved cells polygons + |
+
sopa/segmentation/shapes.py
sopa.stats.mean_distance(adata, group_key, target_group_key=None, ignore_zeros=False)
+
+Mean distance between two groups (typically, between cell-types, or between cell-types and domains)
+ +The distance is a number of hops, i.e. a distance of 10 between a pDC and a T cell means that there are 10 cells on the closest path from one to the other cell.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
adata |
+
+ AnnData
+ |
+
+
+
+ An |
+ + required + | +
group_key |
+
+ str
+ |
+
+
+
+ Key of |
+ + required + | +
target_group_key |
+
+ str | None
+ |
+
+
+
+ Key of |
+
+ None
+ |
+
ignore_zeros |
+
+ bool
+ |
+
+
+
+ If |
+
+ False
+ |
+
Returns:
+Type | +Description | +
---|---|
+ DataFrame
+ |
+
+
+
+
|
+
sopa/stats/distance.py
sopa.stats.geometrize_niches(adata, niche_key, buffer='auto', perc_area_th=0.05)
+
+Converts the niches to shapely polygons, and put into a GeoDataFrame
. Note that each niche can appear multiple times, as they can be separated by other niches ; in this case, we call them different "components" of the same niche ID.
You can show niches components with GeoPandas +
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
adata |
+
+ AnnData | SpatialData
+ |
+
+
+
+ An |
+ + required + | +
niche_key |
+
+ str
+ |
+
+
+
+ Key of |
+ + required + | +
buffer |
+
+ int | str
+ |
+
+
+
+ Expansion radius applied on components. By default, |
+
+ 'auto'
+ |
+
perc_area_th |
+
+ float
+ |
+
+
+
+ For each niche, components whose area is less than |
+
+ 0.05
+ |
+
Returns:
+Type | +Description | +
---|---|
+ GeoDataFrame
+ |
+
+
+
+ A |
+
sopa/stats/morpho.py
sopa.stats.niches_geometry_stats(adata, niche_key, aggregation='mean', key_added_suffix='_distance_to_niche_', **geometrize_niches_kwargs)
+
+Computes statistics over niches geometries
+ +n_components
: Number of connected component of a niche (a component is a group of neighbor cells with the same niche attribute)length
: Mean distance of the exterior/boundary of the components of a nichearea
: Mean area of the components of a nicheroundness
: Float value between 0 and 1. The higher the value, the closer to a circle. Computed via 4 * pi * area / length**2
mean_distance_to_niche_X
: mean distance to the niche (between the two closest points of the niches)Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
adata |
+
+ AnnData | SpatialData
+ |
+
+
+
+ An |
+ + required + | +
niche_key |
+
+ str
+ |
+
+
+
+ Key of |
+ + required + | +
aggregation |
+
+ str | list[str]
+ |
+
+
+
+ Aggregation mode. Either one string such as |
+
+ 'mean'
+ |
+
key_added_suffix |
+
+ str
+ |
+
+
+
+ Suffix added in the DataFrame columns. Defaults to "distance_to_niche". + |
+
+ '_distance_to_niche_'
+ |
+
geometrize_niches_kwargs |
+
+ str
+ |
+
+
+
+ Kwargs to the |
+
+ {}
+ |
+
Returns:
+Type | +Description | +
---|---|
+ GeoDataFrame
+ |
+
+
+
+ A |
+
sopa/stats/morpho.py
sopa.stats.cells_to_groups(adata, group_key, key_added_prefix=None, ignore_zeros=False)
+
+Compute the hop-distance between each cell and a cell category/group.
+ + + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
adata |
+
+ AnnData
+ |
+
+
+
+ An |
+ + required + | +
group_key |
+
+ str
+ |
+
+
+
+ Key of |
+ + required + | +
key_added_prefix |
+
+ str | None
+ |
+
+
+
+ Prefix to the key added in |
+
+ None
+ |
+
ignore_zeros |
+
+ bool
+ |
+
+
+
+ If |
+
+ False
+ |
+
Returns:
+Type | +Description | +
---|---|
+ DataFrame | None
+ |
+
+
+
+ A |
+
sopa/stats/distance.py
sopa.stats.spatial_neighbors(adata, radius, library_key=None, percentile=None, set_diag=False)
+
+Create a Delaunay graph from spatial coordinates. This function comes from squidpy.
+ + + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
adata |
+
+ AnnData | SpatialData
+ |
+
+
+
+ AnnData object + |
+ + required + | +
radius |
+
+ tuple[float, float] | None
+ |
+
+
+
+ tuple that prunes the final graph to only contain edges in interval |
+ + required + | +
library_key |
+
+ str | None
+ |
+
+
+
+ Optional batch key in adata.obs + |
+
+ None
+ |
+
percentile |
+
+ float | None
+ |
+
+
+
+ Percentile of the distances to use as threshold. + |
+
+ None
+ |
+
set_diag |
+
+ bool
+ |
+
+
+
+ Whether to set the diagonal of the spatial connectivities to |
+
+ False
+ |
+
sopa/stats/_build.py
sopa.utils.data.uniform(*_, length=2048, cell_density=0.01, n_points_per_cell=50, n_genes=5, c_coords=['DAPI', 'CK', 'CD3', 'CD20'], sigma_factor=0.4, seed=0, save_vertices=False, apply_blur=True)
+
+Generate a dummy dataset composed of cells generated uniformly in a square. It also has transcripts.
+ + + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
length |
+
+ int
+ |
+
+
+
+ Size of the square, in pixels + |
+
+ 2048
+ |
+
cell_density |
+
+ float
+ |
+
+
+
+ Density of cells per pixel^2 + |
+
+ 0.01
+ |
+
n_points_per_cell |
+
+ int
+ |
+
+
+
+ Mean number of transcripts per cell + |
+
+ 50
+ |
+
n_genes |
+
+ int
+ |
+
+
+
+ Number of gene names + |
+
+ 5
+ |
+
c_coords |
+
+ list[str]
+ |
+
+
+
+ Channel names + |
+
+ ['DAPI', 'CK', 'CD3', 'CD20']
+ |
+
sigma_factor |
+
+ float
+ |
+
+
+
+ Factor used to determine |
+
+ 0.4
+ |
+
seed |
+
+ int
+ |
+
+
+
+ Numpy random seed + |
+
+ 0
+ |
+
save_vertices |
+
+ bool
+ |
+
+
+
+ Whether to save the vertices of the cells (as points) + |
+
+ False
+ |
+
apply_blur |
+
+ bool
+ |
+
+
+
+ Whether to apply gaussian blur on the cells (without blur, cells are just one pixel) + |
+
+ True
+ |
+
Returns:
+Type | +Description | +
---|---|
+ SpatialData
+ |
+
+
+
+ A SpatialData object with a 2D image ( |
+
sopa/utils/data.py
16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 |
|
sopa.utils.data.blobs(*_, length=1024, n_points=10000, c_coords=['DAPI', 'CK', 'CD3', 'CD20'], **kwargs)
+
+Adapts the blobs dataset from SpatialData for sopa. Please refer to the SpatialData documentation
+ +sopa/utils/data.py
{"use strict";/*!
+ * escape-html
+ * Copyright(c) 2012-2013 TJ Holowaychuk
+ * Copyright(c) 2015 Andreas Lubbe
+ * Copyright(c) 2015 Tiancheng "Timothy" Gu
+ * MIT Licensed
+ */var Ha=/["'&<>]/;Un.exports=$a;function $a(e){var t=""+e,r=Ha.exec(t);if(!r)return t;var o,n="",i=0,s=0;for(i=r.index;i