semvec/pypi-packages huggingface dataset:
semanticst 1.1.3
SemanticST: Spatially informed semantic graph learning for effective clustering and integration of spatial transcriptomics
License: MIT
Requires Python: >=3.9

# SemanticST

![SemanticST Pipeline](https://github.com/roxana9/SemanticST/raw/main/semanticst_figure.png)

---

## 🔷 SemanticST Overview
SemanticST is a graph neural network-based unsupervised deep learning approach for spatial transcriptomics data analysis. SemanticST employs a sophisticated learning strategy to integrate gene expression and spatial information, enabling the model to learn a latent representation of spatial transcriptomics (ST) data. SemanticST uses a learnable weighted graph representation, termed Semantic Graphs, to better capture the complexity and diversity of biological processes. For each semantic graph, a unique embedding is learned using an autoencoder with Graph Convolutional Network (GCN) layers, representing distinct semantic features in latent space. To combine these representations, SemanticST introduces a learnable weight, referred to as the semantic score, for each semantic graph. The final graph representation is then dynamically fused by weighting and combining the individual embeddings based on their semantic scores, resulting in a more accurate and adaptive graph representation. SemanticST incorporates the MinCut loss function together with the Deep MinCut (DMC) learning algorithm. This approach not only captures the global structure of the graph but also reduces redundant training time. More importantly, it ensures that the learned embeddings are both meaningful and interpretable, providing a more robust and insightful representation of the graph. Notably, we incorporated a mini-batch training option in SemanticST by training the model on spatial graphs in smaller batches. This feature allows the learned semantic graph to maintain both local and global perspectives across batches, making SemanticST memory-efficient and scalable, enabling its application to any spatial transcriptomics dataset, regardless of the number of samples. 


## 🔷 Requirements  
To run SemanticST, install the following dependencies:

```bash
*python==3.9.20
*numpy==1.23.4
*anndata==0.10.9
*h5py==3.12.1
*leidenalg==0.10.2
*louvain==0.8.2
*matplotlib==3.9.2
*numba==0.60.0
*scanpy==1.10.3
*scikit-image==0.24.0
*scikit-learn==1.5.2
*scikit-misc==0.3.1
*torch==2.5.1
*torch-geometric==2.6.1
*rpy2==3.5.11
*POT==0.9.5
*torchviz==0.0.2
```
## 🔷 R Dependency  

**SemanticST** requires **R (≥4.1.2)** for `rpy2`. 

##  Installation  

You can install **SemanticST** via **PyPI**:
```bash
pip install semanticst
```
---
Or install from GitHub:
```bash
pip install git+https://github.com/roxana9/SemanticST.git
```
---
To install all dependencies, run:
```bash
pip install -r requirements.txt
```


## 🔷 Step-by-Step Tutorial  

For a full tutorial on how to use **SemanticST**, visit our documentation:  

🔗 [**SemanticST Tutorial Webpage**][https://semanticst-tutorial.readthedocs.io/en/latest/](https://semanticst-tutorial.readthedocs.io/en/latest/)
vantranstool 0.1.1
一个基于MCP协议的运输工具服务，提供批量外部派车功能
License: MIT
Requires Python: >=3.8

# vantransTool

一个基于MCP协议的运输工具服务，提供批量外部派车功能。

## 功能特点

- 支持批量外部派车
- 支持多组订单号、供应商和指派类型
- 基于MCP协议的高效通信
- 完整的错误处理和日志记录

## 安装

```bash
pip install vantransTool
```

## 使用方法

1. 启动服务器：

```bash
python -m vantransTool.server
```

2. 使用客户端：

```python
import asyncio
from vantransTool.client import dispatch_orders

async def main():
    dispatch_groups = [
        {
            "order_numbers": ["5000987906", "5000987907"],
            "supplier_name": "上海乐增",
            "dispatch_type": "提货"
        }
    ]
    result = await dispatch_orders(dispatch_groups)
    print(result)

if __name__ == "__main__":
    asyncio.run(main())
```

## 配置

在 `config.py` 中配置以下参数：

- `BASE_URL`: API基础URL
- `API_TOKEN`: API令牌
- `SPACE_ID`: 空间ID
- `SUPPLIER_DISPATCH_TABLE`: 供应商派车表ID
- `GOODS_DETAIL_TABLE`: 货物明细表ID
- `SUPPLIER_TABLE`: 供应商表ID
- `SUPPLIER_VIEW`: 供应商视图ID

## 开发

1. 克隆仓库：

```bash
git clone https://github.com/yourusername/vantransTool.git
cd vantransTool
```

2. 安装开发依赖：

```bash
pip install -e ".[dev]"
```

3. 运行测试：

```bash
python -m pytest
```

## 许可证

MIT License