Skip to main content

Cell Segmentation for Spatial Transcriptomics Data using BOMS

Project description

BOMS : Cell Segmentation method for Spatial Transcriptomics

BOMS Overview

BOMS is a tool for cell segmentation in fluorescent in-situ hybridization (FISH) based Spatial Transcriptomics datasets. It takes as input the gene locations and labels. It assumes that a cell body is homogenous in its transcriptional signature and uses the similarity of these neighborhoods to cluster them together as one cell. The method can also incorporate the flows obtained from Cellpose Segmentation on DAPI/Cell Membrane channels to improve its cell segmentation.

Installation

The package requires Python > 3.9. The package can be installed using pip as follows:

pip install boms

Usage

The data for the method is provided in the form of three numpy arrays : x representing the x coordinates of the mRNA spots, y representing the y coordinates of the mRNA spots and g representing the labels of the mRNA spots. The cell segmentation can be performed as follows:

from boms import run_boms

"""
:param epochs: Number of iterations for the BOMS algorithm. Recommendation: 30
:param h_s: Spatial Bandwidth. Recommendation: Roughly equal to the radius of the cell body.
:param h_r: Range Bandwidth. Recommendation: 0.3 - 0.5
:param K: Number of Nearest Neighbors to form the Neighborhood Gene Expression Profile. Recommendation: 30

:return modes: N x (2 + no. of genes) array containing the final modes.
:return seg: N x 1 array containing the final segmentation.
"""

modes, seg = run_boms(x, y, g, epochs=30, h_s=10, h_r=0.3, K=30)

Demo

A demo notebook is available to run on Google Colab - BOMS Demo

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

boms-1.1.0.tar.gz (37.7 kB view details)

Uploaded Source

Built Distributions

boms-1.1.0-pp310-pypy310_pp73-win_amd64.whl (161.3 kB view details)

Uploaded PyPy Windows x86-64

boms-1.1.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (198.1 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

boms-1.1.0-pp310-pypy310_pp73-manylinux_2_17_i686.manylinux2014_i686.whl (205.4 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ i686

boms-1.1.0-pp39-pypy39_pp73-win_amd64.whl (161.4 kB view details)

Uploaded PyPy Windows x86-64

boms-1.1.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (198.0 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

boms-1.1.0-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl (205.2 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ i686

boms-1.1.0-cp310-cp310-win_amd64.whl (161.1 kB view details)

Uploaded CPython 3.10 Windows x86-64

boms-1.1.0-cp310-cp310-win32.whl (142.2 kB view details)

Uploaded CPython 3.10 Windows x86

boms-1.1.0-cp310-cp310-musllinux_1_1_x86_64.whl (716.5 kB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

boms-1.1.0-cp310-cp310-musllinux_1_1_i686.whl (752.0 kB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ i686

boms-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (195.7 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

boms-1.1.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl (204.4 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ i686

boms-1.1.0-cp39-cp39-win_amd64.whl (160.7 kB view details)

Uploaded CPython 3.9 Windows x86-64

boms-1.1.0-cp39-cp39-win32.whl (142.5 kB view details)

Uploaded CPython 3.9 Windows x86

boms-1.1.0-cp39-cp39-musllinux_1_1_x86_64.whl (716.5 kB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

boms-1.1.0-cp39-cp39-musllinux_1_1_i686.whl (752.1 kB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ i686

boms-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (195.9 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

boms-1.1.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl (204.7 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ i686

File details

Details for the file boms-1.1.0.tar.gz.

File metadata

  • Download URL: boms-1.1.0.tar.gz
  • Upload date:
  • Size: 37.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for boms-1.1.0.tar.gz
Algorithm Hash digest
SHA256 c64a867233148dab9d32257e86b127793022f893321a43210ceaafa02870cd7c
MD5 e6528d34dc36da5436d4708315a1f948
BLAKE2b-256 8bd6b8ddafda4791e5a07fc94128c171857cecaa6720cf2909fc3c6721ada7ab

See more details on using hashes here.

File details

Details for the file boms-1.1.0-pp310-pypy310_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for boms-1.1.0-pp310-pypy310_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 7bd939f1f85b31afb1339d46b06e4c9368000ee0dbc9626510cf4bab979d7a62
MD5 c5c7a3536d638ed0b413b0e2b6082e53
BLAKE2b-256 09747ebdaa0f31db6f375836d6017735c75cfbcc090878dd5b2f90783b3effb3

See more details on using hashes here.

File details

Details for the file boms-1.1.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for boms-1.1.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2cef943b6273b5a544852c1cc05c6202eec2674a67c0f5dcb6a1dc82833c76ea
MD5 5ab025e7c1873ad03d66ae0885d648de
BLAKE2b-256 f2aeba28685ebe9269d52b28a59b54a0b1145b47a24732db10f7fb0bd71e0f06

See more details on using hashes here.

File details

Details for the file boms-1.1.0-pp310-pypy310_pp73-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for boms-1.1.0-pp310-pypy310_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 625b344f5eac103911aafe092d2d0c05baad9dedecdfd323079129e442233f21
MD5 2ea19ce073fc15d16b7ca50eb0166f8b
BLAKE2b-256 ff57398f33f0f63267f390d087f979b0f7f2ccea4a2ba85dc5d6c6494d38e0ad

See more details on using hashes here.

File details

Details for the file boms-1.1.0-pp39-pypy39_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for boms-1.1.0-pp39-pypy39_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 5a31bbd1621e8ef9bcbad8713d92d75e5f1aecbc32253f597b8b2050c2899667
MD5 86c43d8c035586f2e30286ebf6b0d26d
BLAKE2b-256 3d1469a5c8fd0c42ddb56a871c4a50d1843685fcb68c5ce20b059a1e517e8bcf

See more details on using hashes here.

File details

Details for the file boms-1.1.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for boms-1.1.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a22183d55a1d5ea7b1d99fcbf780aa22dc35482aaef3f0fd5f07a28c066e68ae
MD5 3b6d27b2805d3f721dbcee198cfb2ff3
BLAKE2b-256 5edce1e82e8ee558c78310f69caeb6dac7047304f62ff3f58b8de2ace200ca7b

See more details on using hashes here.

File details

Details for the file boms-1.1.0-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for boms-1.1.0-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 e32cd7ea4143ffc81dd9fb4e8a1a00bb71fdcbb4e7fc5f1e24392fd67b74b02c
MD5 f3f1d61e36495a4d2cfb9da48796ac14
BLAKE2b-256 01cd2a29e33349008891843806a92da780762581bb6b3eedcb8e7ba45d9ebbf6

See more details on using hashes here.

File details

Details for the file boms-1.1.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: boms-1.1.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 161.1 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for boms-1.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b8c41cb326db94be0354ba9c86c179b2d9a9b44de726eb6f4339d472e26ba96a
MD5 494a360fb0cce210a5605866d8a403a8
BLAKE2b-256 612488cca1965dc6c8fc436b6510e5239e9bb82393dd34325f56ab3ff5c96186

See more details on using hashes here.

File details

Details for the file boms-1.1.0-cp310-cp310-win32.whl.

File metadata

  • Download URL: boms-1.1.0-cp310-cp310-win32.whl
  • Upload date:
  • Size: 142.2 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for boms-1.1.0-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 bf94f2253069c62039e36d619b7cc08b5631c33223d8465e8dce213327969eb3
MD5 b96396f37c2f67fa4d4e347e7ecf3099
BLAKE2b-256 dff8005529798a3e73b134fece3b3d7a131afada3a0ee348d3459ec1663fa836

See more details on using hashes here.

File details

Details for the file boms-1.1.0-cp310-cp310-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for boms-1.1.0-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 4fe99c34dc7b47e521b89cff30401bc27e52d31640acc550f47d6f54f7237e5f
MD5 51c9906d5f41f973d619b5f1c52e3fcd
BLAKE2b-256 92c1c4e362a24a6fbc151e092949c98ffb690dfdce1a785af5340c248ae85496

See more details on using hashes here.

File details

Details for the file boms-1.1.0-cp310-cp310-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for boms-1.1.0-cp310-cp310-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 8c80dba6394ba970bcc0ebcc0b76e1a1bd63970f5edee45c86264e1ce4569ff9
MD5 e471629ef195158f836031401bcfd578
BLAKE2b-256 caabda3acb1b379095d1c065bd707306b68e1a5fbc939a23a72e6788b2a443f7

See more details on using hashes here.

File details

Details for the file boms-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for boms-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f0412c6902844cc9f9097e3bb0e923ecc0681055a12574d09c2508029b9238c0
MD5 28ecfe8a0a787ea95b45a99a7ed28675
BLAKE2b-256 2bc1b52496e2b65d77ce5f8f36a61aa23cba1c552f2a14ae85c6eea9bcbe31cc

See more details on using hashes here.

File details

Details for the file boms-1.1.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for boms-1.1.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 99c0ddd5b2dd2ed0a5fc681d880c748fe4ba65f884914437ae0722b97e570c22
MD5 73ba308a2c5de1b9c7157999d4b9fe9c
BLAKE2b-256 9f70260e113a7d1a42240bb1bace24573be121a78e5331ddd8990c4b024d5db2

See more details on using hashes here.

File details

Details for the file boms-1.1.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: boms-1.1.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 160.7 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for boms-1.1.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c014ab88477bc5b4971dfc42a4a4e0f1fde6d30e2720c79a1e727ceb1ca9a133
MD5 9a10e4438d9443b4cb90c6f32b409a86
BLAKE2b-256 31d82c8bcce347f5998ac7785842f8f9369b90412b48bd15fb0f14fc325428fe

See more details on using hashes here.

File details

Details for the file boms-1.1.0-cp39-cp39-win32.whl.

File metadata

  • Download URL: boms-1.1.0-cp39-cp39-win32.whl
  • Upload date:
  • Size: 142.5 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for boms-1.1.0-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 1362650671563045ca962f64af2359a3fa3aabd3224c4ec8ae75917cd8b09719
MD5 f122c4b03998ecd92eac23dfdd2b2186
BLAKE2b-256 be5e168acb8ac65bfb289dec179d3c37e07dcee853a7cbcc909bd5389b075dda

See more details on using hashes here.

File details

Details for the file boms-1.1.0-cp39-cp39-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for boms-1.1.0-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 e58c8d6a4cbeb7f0e68e9d789267dd6ad48a8cfd3dd79b808a518cbadb06148f
MD5 3d25614d14097dd4fc45ef980ca3d712
BLAKE2b-256 2fe8a24a010bd312aa74c6d70f5104d7af3e6d1ca43eae7148e6618f8887cee9

See more details on using hashes here.

File details

Details for the file boms-1.1.0-cp39-cp39-musllinux_1_1_i686.whl.

File metadata

  • Download URL: boms-1.1.0-cp39-cp39-musllinux_1_1_i686.whl
  • Upload date:
  • Size: 752.1 kB
  • Tags: CPython 3.9, musllinux: musl 1.1+ i686
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for boms-1.1.0-cp39-cp39-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 84f9ed26c58f0268548415266c198dbfd5d25105ae2ca23192fee47a96f35557
MD5 c70e24686fc448c929afd4c16accde74
BLAKE2b-256 e0c96bc73e3784d83e385bc707963f7149e0f58616c5f546021e7fe34a22bd09

See more details on using hashes here.

File details

Details for the file boms-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for boms-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f1dd9f2da1338706ab30dc4872b3ea0c1e0eb2d5813e2951c9f6b52d6250ddd6
MD5 350e06430db38a713711558b155eb942
BLAKE2b-256 d842f27175d4ef3aa72a8ebd2a2ba07c699550ae901417b567632713d520506d

See more details on using hashes here.

File details

Details for the file boms-1.1.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for boms-1.1.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 90fabd9ca29560a64abae1992e8d4fc14da906bb4595be11088f22ba960cc6b9
MD5 be57be886788bcbdb6786f5d6fd317a8
BLAKE2b-256 878fe8f80754f1c1d017f7918f4bf47adeacc7d367ed6b03f28ce9599ee25ac1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page