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.1.0.tar.gz (233.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.1.0-py3-none-any.whl (31.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tiedie-2.1.0.tar.gz
  • Upload date:
  • Size: 233.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for tiedie-2.1.0.tar.gz
Algorithm Hash digest
SHA256 fbdbdd591ab3955f2ed1d6ef24a559f1699ac35a6a70cc9b48d7de4d2bfe3977
MD5 7c9448dfc7986c9dd278fe97ea51f95a
BLAKE2b-256 9ce9d8ca834a339bc40d01db3b38be5d487e4cadb1bae7de2964c2e2f42b3f6e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tiedie-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 31.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for tiedie-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 35509f5119bd044bb1bc0d9b9ac75fa596e636255f5e6b8c2f2e443cc2003654
MD5 40dd9e0966451c35b0a2f501d5410108
BLAKE2b-256 91f0d2caf9a83b9f02515a7de3e3c145eab0790711366ed10c90785b046f6549

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