Skip to main content

TieDIE: Tied Diffusion for Network Discovery

Project description

TieDIE: Tied Diffusion for Subnetwork Discovery

Tests Documentation GitHub release

A network analysis algorithm that finds subnetworks connecting genomic perturbations to transcriptional changes in large gene interaction networks.

Documentation | GitHub

Authors

Evan O. Paull, Daniel Carlin and Joshua M. Stuart (UC Santa Cruz)

Additional Contributors

  • Srikanth Bezawada (TieDIE Cytoscape Plugin)
  • Josh L. Espinoza (Quick kernel loading feature)
  • Dana Silverbush (MATLAB kernel generation code updates)
  • Denes Turei (modern tooling and packaging)

Requirements

  • Python >= 3.9
  • numpy >= 1.20
  • scipy >= 1.0
  • networkx >= 2.0

Installation

Using pip (from GitHub)

pip install git+https://github.com/saezlab/tiedie.git

Using uv (recommended)

uv is a fast Python package manager. To install TieDIE with uv:

# Install uv if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh

# Create a new project with TieDIE
uv init my-project
cd my-project
uv add git+https://github.com/saezlab/tiedie.git

# Or add to an existing project
uv add git+https://github.com/saezlab/tiedie.git

Development installation

git clone https://github.com/saezlab/tiedie.git
cd tiedie

# Using uv (recommended)
uv venv
source .venv/bin/activate
uv pip install -e ".[tests]"

# Or using pip
python -m venv .venv
source .venv/bin/activate
pip install -e ".[tests]"

Usage

Command Line Interface

tiedie -n pathway.sif -u upstream.input -d downstream.input

For full options:

tiedie --help

Python API

from tiedie import ScipyKernel
from tiedie.util import parse_heats, parse_net, normalize_heats

# Parse input files
network = parse_net('pathway.sif')
upstream_heats, upstream_signs = parse_heats('upstream.input')
downstream_heats, downstream_signs = parse_heats('downstream.input')

# Normalize heats
upstream_norm = normalize_heats(upstream_heats)
downstream_norm = normalize_heats(downstream_heats)

# Create diffusion kernel and run diffusion
diffuser = ScipyKernel('pathway.sif')
up_diffused = diffuser.diffuse(upstream_norm, reverse=False)
down_diffused = diffuser.diffuse(downstream_norm, reverse=True)

Input File Formats

Network file (.sif)

Tab-separated: source \t interaction \t target

GeneA	-a>	GeneB
GeneB	-t|	GeneC

Interaction types:

  • -a> : activation
  • -t| : inhibition
  • -component> : component relationship

Heat file (.input)

Tab-separated: gene \t heat \t sign

GeneA	10.5	+
GeneB	8.2	-

Project Structure

tiedie/
├── __init__.py      # Public API
├── cli.py           # Command-line interface
├── kernel.py        # Pre-computed kernel diffusion
├── kernel_scipy.py  # On-the-fly kernel generation (scipy)
├── ppr.py           # Personalized PageRank diffusion
├── permute.py       # Permutation testing
├── util.py          # Utility functions
└── ...
tests/               # Test suite
docs/                # Documentation (Tutorial.pdf, FAQ.txt)

Publications

TieDIE was first featured in the 2013 Nature paper "Comprehensive molecular characterization of clear cell renal cell carcinoma" (TCGA Network). In this publication, TieDIE analysis connected frequently mutated genes involving the SWI/SNF chromatin remodelling complex to gene expression changes characteristic of tumor development and progression. The TieDIE network solution is shown in Figure 4: http://www.nature.com/nature/journal/v499/n7456/full/nature12222.html

License

GPL-3.0-or-later

Contact

Feature requests, comments and requests for clarification should be sent to epaull@soe.ucsc.edu.

Development

Running tests

# Install test dependencies
uv pip install -e ".[tests]"

# Run tests
pytest

# Run tests with coverage
pytest --cov=tiedie

Linting and formatting

The project uses ruff for linting and formatting:

# Check for issues
ruff check .

# Auto-fix issues
ruff check --fix .

# Format code
ruff format .

Pre-commit hooks

Pre-commit hooks are configured for automated checks:

# Install pre-commit hooks
uv pip install -e ".[dev]"
pre-commit install

# Run hooks manually on all files
pre-commit run --all-files

Building documentation

Documentation is built with MkDocs:

# Install docs dependencies
uv pip install -e ".[docs]"

# Serve docs locally
mkdocs serve

# Build static docs
mkdocs build

Version 2.0 Notes

This version represents a major modernization of the TieDIE codebase:

  • Python 3 compatibility: Ported from Python 2.7 to Python 3.9+
  • Modern packaging: Converted to a proper Python package with pyproject.toml and hatchling build backend
  • Test suite: Added pytest-based test suite with integration tests
  • uv support: Compatible with modern Python tooling including uv
  • CLI improvements: Migrated from optparse to argparse

This modernization was done at Saez Lab by Dénes Türei (turei.denes@gmail.com).

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

tiedie-2.0.2.tar.gz (244.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tiedie-2.0.2-py3-none-any.whl (42.4 kB view details)

Uploaded Python 3

File details

Details for the file tiedie-2.0.2.tar.gz.

File metadata

  • Download URL: tiedie-2.0.2.tar.gz
  • Upload date:
  • Size: 244.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for tiedie-2.0.2.tar.gz
Algorithm Hash digest
SHA256 2c6e37419e72cfd733c8b9854643aedfe35efd145def78382d9be6c8d9a3189e
MD5 bd411402d209e80ea82bf7c306627510
BLAKE2b-256 0072873e2ae07615bc3792252d6e455e068800e6bca53d2251a6ab525bdd499a

See more details on using hashes here.

File details

Details for the file tiedie-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: tiedie-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 42.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for tiedie-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8586752fc17f910dcae0d9ef8d42b898a44392f6ca0e70754d2c3a201af639ec
MD5 439c4322ee6232226a7c4ff6dd712be5
BLAKE2b-256 9c7dbeab5adbe4cabf1b960b2b8b2d80904e997dc468a0ae4df3db791db91b6a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page