$scE^2TM$: Toward Interpretable Single-Cell Embedding via Topic Modeling
The full description of $scE^2TM$ and its application on published single cell RNA-seq datasets are available.
The repository includes detailed installation instructions and requirements, scripts and demos.
1 Schematic overview of $scE^2TM$.
(a) To better collaborate the information of different modalities, clusters and topic heads are trained based on mutually refined neighborhood information by encouraging consistent clustering assignments of mutual nearest neighbors of the corresponding cells of different modalities in the embedding space. (b) ECR clusters gene embeddings $g_j$ (•) as samples and topic embeddings $t_k$ (★) as centers with soft assignment $\pi^{*}_{\epsilon,jk}$. Here, ECR pushes $g_1$ and $g_2$ close to $t_1$, and away from $t_3$ and $t_5$. (c) Sparse linear decoders learn topic embeddings and gene embeddings as well as sparse topic-gene dependencies during reconstruction, thus ensuring model interpretability.
2 Installation
Create a new python environment.
conda create --name scE2TM_env python=3.8.8
conda activate scE2TM
Install the dependencies from the provided requirements.txt file.
pip install -r requirements.txt
Installation typically completes in approximately 1.5 hours.
3 Usage
Data format
$scE^2TM$ requires the input of cell-by-cell gene matrices, external embedding of cells, and true cell type information in .CSV object format.
The true cell type information is only used for prediction accuracy assessment.
We provide default data (Wang) for users to understand and debug the $scE^2TM$ code.
Training
python run.py
On the provided example dataset, the demo completes in about one minute.
Tutorial
We provide three tutorials in the tutorial directory that introduce the usage of $scE^2TM$ and reproduce the main quantitative results:
- [Clustering and Interpretable Evaluation]
- [Pathway Enrichment]
- [Topic gene embedding]
Reference
If you use $scE^2TM$ in your work, please cite
License
This project is licensed under the MIT License.
Metadata
Release files for scE2TM 1.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sce2tm-1.2.3.tar.gz | 21.3 kB | Without provenance | Details for sce2tm-1.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sce2tm-1.2.3-py3-none-any.whl | Python 3 | none | any | Details for sce2tm-1.2.3-py3-none-any.whl |
Total release size: 43.4 kB
Release files / sce2tm-1.2.3.tar.gz
| Download URL | sce2tm-1.2.3.tar.gz |
|---|---|
| Size | 21.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
126ac9f27020350eeb2aad120ec1d3351091667c02aee602d667d607658c2525
|
|
BLAKE2b-256 checksum How to use checksums |
22ddce274588222d3dbcc9ec3810f9d59facebca85b6d7ea9405b79ed7a8aedb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.8
|
Release files / sce2tm-1.2.3-py3-none-any.whl
| Download URL | sce2tm-1.2.3-py3-none-any.whl |
|---|---|
| Size | 22.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1fa98db7b46d7d84b62642e940c02409a47d3201a02e7ef310174949dedb96de
|
|
BLAKE2b-256 checksum How to use checksums |
7783786c1188f7b48a0da35bfeafae18ad295f61b03f222e1f52cb9779ce5e9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.8
|
Security for scE2TM 1.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.