Gene Regulatory Network inference using Kolmogorov-Arnold Networks
Project description
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kan_grn-1.0.2.tar.gz.
File metadata
- Download URL: kan_grn-1.0.2.tar.gz
- Upload date:
- Size: 47.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af2ccb92623bc3bde9f7332f89ed985eadd48dc48140e5f33b76dd6bdaecd43b
|
|
| MD5 |
30025f6b81f4e095f7689cd84c568068
|
|
| BLAKE2b-256 |
2ff571c053c7922a9b0bd3df04f0f733ee66f3643c7a034e6d4e74cd727c02cf
|
File details
Details for the file kan_grn-1.0.2-py3-none-any.whl.
File metadata
- Download URL: kan_grn-1.0.2-py3-none-any.whl
- Upload date:
- Size: 50.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b9a400d48cfec84424fdc37fa789eaeba5092f7f3a143d09baddcafe32a3c68
|
|
| MD5 |
b1998838b9ed0a7ac201ffc0193070da
|
|
| BLAKE2b-256 |
a867daeefe99c0a7bb932067d905357c3022a8f7fac1c8123171278310ccaa65
|