Skip to main content

Algorithm for finding gene spatial pattern based on Gaussian process accelerated by SOM

Project description

SOMDE pypi

Algorithm for finding gene spatial pattern based on Gaussian process accelerated by SOM


conda install -c conda-forge somoclu
conda install pandas
conda install patsy
pip install somde


Slide-seq data we used can be downloaded from SpatialDB website:


load data

df = pd.read_csv(dataname+'count.csv',sep=',',index_col=1)
corinfo = pd.read_csv(dataname+'idx.csv',sep=',',index_col=0)

After data loading, we can generate a SOM on the tissue spatial domain.

build SOM

from somde import SomNode
som = SomNode(X,20)

You can use som.view() to visualize the distribution of all SOM nodes.

integrate data sites and expression

ndf,ninfo = som.mtx(df)

mtxfunction will generate pesudo gene expression and spatial data site information at reduced resolution.

normalize data and identify SVgenes

Since we integrated the original count data, we need to normalize gene expression matrix in each SomNode object.

nres = som.norm()
result, SVnum

The identification step is mainly based on the adjusted Gaussian Process, which was first proposed by SpatialDE. Visualization results can be found at

Project details

Download files

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

Files for somde, version 0.1.8
Filename, size File type Python version Upload date Hashes
Filename, size somde-0.1.8.tar.gz (8.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page