Impeller
Impeller is a sophisticated package designed for imputing spatial transcriptomics data using path-based graph neural networks. It supports a variety of datasets and integrates powerful processing and machine learning techniques.
Installation
Install the Impeller package using pip with the following command:
pip install Impeller
Usage
The Impeller package simplifies the process of downloading, processing, and training models on spatial transcriptomics data. Follow the steps below to utilize the package effectively.
Download Example Data
The package supports three datasets: '10XVisium', 'Stereoseq', and 'SlideseqV2'. Begin by downloading the dataset of your choice:
from Impeller import download_example_data
# Replace '10XVisium' with 'Stereoseq' or 'SlideseqV2' to download other datasets
download_example_data('10XVisium')
Load and Process Data
Once the data is downloaded, you can load and process it for analysis:
from Impeller import load_and_process_example_data
# Ensure to specify the same dataset you downloaded
data, val_mask, test_mask, x, original_x = load_and_process_example_data('10XVisium')
Train Model
After loading and processing the data, you can initialize the model's arguments and start training:
from Impeller import create_args, train
args = create_args()
test_l1_distance, test_cosine_sim, test_rmse = train(args, data, val_mask, test_mask, x, original_x)
print(f"Final L1 distance: {test_l1_distance}, Cosine similarity: {test_cosine_sim}, RMSE: {test_rmse}.")
Only Inference
You can use Impeller to perform inference on your custom data (you'll need to provide a mask indicating which genes in which cells you want to impute). Below is a demo for inference only (replace the following adata and inference_mask with your own data):
from Impeller import load_example_data, process_inference_data
adata, _, inference_mask = load_example_data(example_dataset = '10XVisium')
data = process_inference_data(adata)
from Impeller import inference
Impeller_imputed_data = inference(args, data, inference_mask)
Naive Baseline
We also provide a simple baseline implementation using K-Nearest Neighbors (KNN):
from Impeller import SpatialKNNImputer
knn_imputer = SpatialKNNImputer(adata, n_neighbors=5)
knn_imputed_data = knn_imputer.impute(inference_mask)
Metadata
Release files for impeller 0.1.2
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 |
|---|---|---|---|---|
| impeller-0.1.2.tar.gz | 8.8 kB | Without provenance | Details for impeller-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| impeller-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for impeller-0.1.2-py3-none-any.whl |
Total release size: 19.5 kB
Release files / impeller-0.1.2.tar.gz
| Download URL | impeller-0.1.2.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
51236702e4d73383333951ff6c4031085fce7c74b4cf115e2f49bd13494dbb74
|
|
BLAKE2b-256 checksum How to use checksums |
784d466b5a7fbd271f4fdb65e94d8699804ad0be61df4e998b2f936196c9e803
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.0
|
Release files / impeller-0.1.2-py3-none-any.whl
| Download URL | impeller-0.1.2-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
178f56f676a1786a83a1c227b5e88068b433971baeaa60b2c452363c54079147
|
|
BLAKE2b-256 checksum How to use checksums |
f22986aabdf17a3891a9e541ff64619926b47b5dd982f49c9d740b1af62b2e74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.0
|
Security for impeller 0.1.2
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.