miRW: A Multi-Omics Random Walk Framework for Sample-Independent Construction of Personalized Protein Interaction Networks in Cancer
Project description
miRW
miRW: A Multi-Omics Random Walk Framework for Sample-Independent Construction of Personalized Protein Interaction Networks in Cancer
miRW provides a computational framework for constructing personalized protein interaction networks by integrating multi-omics data and a modulation-adjusted Random Walk with Restart (RWR) algorithm. This tool enables sample-specific network refinement and supports downstream analysis in cancer and other complex diseases.
Installation
pip install miRW
Example Usage
Example datasets can be downloaded from:
https://github.com/bioUroZC/miRW/tree/main/miRWsingleLayer/data_example
Running miRW on Example Data
import pandas as pd
from miRW import single_RWSeed_prepare, single_RWSeed_analysis
# === Step 1: Load example data ===
links = pd.read_csv("Links.csv", index_col=0)
expr = pd.read_csv("exprSet.csv", index_col=0)
# CellMarkers is optional
try:
seeds = pd.read_csv("CellMarkers.csv")
except FileNotFoundError:
print("CellMarkers.csv not found; using the first gene as fallback seed.")
seeds = pd.DataFrame({"symbol": [expr.index[0]]})
# === Step 2: Choose a sample ID ===
sample_id = expr.columns[0]
print("Testing sample:", sample_id)
# === Step 3: Prepare the protein interaction network ===
G, real_w, expr2, seeds2 = single_RWSeed_prepare(seeds, links, expr)
# === Step 4: Run Random Walk with Restart ===
result = single_RWSeed_analysis(sample_id, G, real_w, expr2, seeds2)
# === Step 5: Inspect the output ===
print(result.head())
print("\nmiRW test completed successfully!")
Input Data Format
1. Protein Interaction Network (Links.csv)
Required columns:
| Column | Description |
|---|---|
| protein1 | First protein/gene in interaction |
| protein2 | Second protein/gene |
| score | Interaction confidence score |
2. Expression Matrix (exprSet.csv)
- Rows → Genes
- Columns → Sample IDs
- Values → Expression levels (e.g., TPM, FPKM, normalized counts)
Example:
| Gene | Sample1 | Sample2 | Sample3 |
|---|---|---|---|
| TP53 | 3.12 | 2.89 | 3.55 |
| EGFR | 1.22 | 0.98 | 1.34 |
3. Seed Gene List (CellMarkers.csv, optional)
Required column:
| Column | Description |
|---|---|
| symbol | Seed or marker genes used to initiate RWR |
If no seed file is provided, miRW automatically assigns the first gene in your expression matrix as the fallback seed.
Output
The function single_RWSeed_analysis returns a DataFrame containing:
| Column | Description |
|---|---|
| Sample | Sample ID |
| link | Sorted gene pair (e.g., GeneA_GeneB) |
| miRW-Imp | Importance-adjusted interaction weight |
| miRW-Flow | Flow-based score derived from RWR |
These scores can be used for network-based biomarker discovery, pathway investigation, and integration with downstream multi-omics analyses.
Features
- Modulation-adjusted edge weights using expression deviation
- Sparse matrix–optimized Random Walk with Restart
- Personalized network construction for each sample
- Outputs interpretable edge-level importance and flow scores
License
This project is licensed under the MIT License.
Project Repository
GitHub: https://github.com/bioUroZC/miRW
PyPI: https://pypi.org/project/miRW/
Project details
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 mirw-0.2.2.tar.gz.
File metadata
- Download URL: mirw-0.2.2.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6462dc3dc13a5c4a0d673c27f05d831e660c31589a63545998dae56d4760ebf
|
|
| MD5 |
b65683ff9986e67acd65b9d6cae7741a
|
|
| BLAKE2b-256 |
f668fb36990d25f3d5225f598140a0de33fb8fd20b8d1106dff66d7ffb764d5a
|
File details
Details for the file mirw-0.2.2-py3-none-any.whl.
File metadata
- Download URL: mirw-0.2.2-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d2f9089cd2733f5db0163821e9b0ff0d3265e2d4523f3714173865b9e97f564
|
|
| MD5 |
443651d0a397e067b44a44ef2cfe31d2
|
|
| BLAKE2b-256 |
db7cbd62c9a99cd829bfd326e053f019e8f7a59f78996c84d933f2628b7e7c61
|