KAN-GRN
Gene Regulatory Network Inference using Kolmogorov-Arnold Networks
KAN-GRN infers Gene Regulatory Networks (GRNs) from single-cell RNA sequencing data using Kolmogorov-Arnold Networks (KANs).
Installation
pip install kan-grn
For GPU support:
pip install torch --index-url https://download.pytorch.org/whl/cu124
pip install kan-grn
Quick Start
Command Line
# Basic usage
kan-grn run expression_data.h5ad network_file.tsv
# With custom parameters
kan-grn run expression_data.h5ad network_file.tsv --output-dir results --n-top-genes 3000 --epochs 100 --device cuda
Python API
import kan_grn
pipeline_config = kan_grn.PipelineConfig(
expression_file="expression_data.h5ad",
network_file="network.tsv",
output_dir="results",
n_top_genes=3000,
device="cuda",
model_config=kan_grn.ModelConfig(grid=5, k=4),
training_config=kan_grn.TrainingConfig(
batch_size=128,
epochs=100,
learning_rate=0.001,
generate_symbolic=True,
),
)
pipeline = kan_grn.KANGRNPipeline(pipeline_config)
results = pipeline.train_models_only()
CLI Options
| Option | Default | Description |
|---|---|---|
--output-dir |
results |
Output directory |
--n-top-genes |
2000 |
Top highly variable genes |
--grid |
5 |
KAN grid parameter |
--k |
4 |
KAN k parameter |
--batch-size |
128 |
Batch size |
--epochs |
100 |
Max epochs |
--learning-rate |
0.001 |
Learning rate |
--device |
auto |
cuda, cpu, or auto |
--filter-method |
zscore |
Network filtering method |
Input Formats
- Expression data:
.h5ad(AnnData) with cells × genes matrix - Network file:
.tsvwith columns:source_gene,target_gene,weight
Requirements
Python ≥ 3.8, PyTorch ≥ 1.9.0, Scanpy ≥ 1.9.0, PyKAN
Links
License
GPL-3.0
Author
Posh Raj Dahal (dahal.poshraj24@gmail.com)
Metadata
Release files for kan-grn 1.0.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 | |
|---|---|---|---|
| kan_grn-1.0.2.tar.gz | 47.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kan_grn-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 97.4 kB
Release files / kan_grn-1.0.2.tar.gz
| Download URL | kan_grn-1.0.2.tar.gz |
|---|---|
| Size | 47.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af2ccb92623bc3bde9f7332f89ed985eadd48dc48140e5f33b76dd6bdaecd43b
|
|
BLAKE2b-256 checksum How to use checksums |
2ff571c053c7922a9b0bd3df04f0f733ee66f3643c7a034e6d4e74cd727c02cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.0
|
Release files / kan_grn-1.0.2-py3-none-any.whl
| Download URL | kan_grn-1.0.2-py3-none-any.whl |
|---|---|
| Size | 50.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3b9a400d48cfec84424fdc37fa789eaeba5092f7f3a143d09baddcafe32a3c68
|
|
BLAKE2b-256 checksum How to use checksums |
a867daeefe99c0a7bb932067d905357c3022a8f7fac1c8123171278310ccaa65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.0
|