Skip to main content

Dependency network analysis under two conditions

Project description

DDN 3.0

We developed an efficient and accurate differential network analysis tool – Differential Dependency Networks (DDN). DDN is capable of jointly learning sparse common and rewired network structures, which is especially useful for genomics, proteomics, and other biomedical studies. DDN 3.0 significantly improves the speed of previous verions of DDN, and is available as a Python package. This repository provides the source code and examples of using DDN.

Installation

Option 1: install into a new Conda environment using pip

One way is to install DDN into a new Conda environment. To create and activate an environment named ddn, run this:

conda create -n ddn python=3.11
conda activate ddn

Python 3.12 may have some issue with Numba.

DDN 3.0 can then be installed with the followin command.

pip install ddn3

Option 2: install into an existing Conda environment

If you want to install DDN into an existing Conda environment, it is suggested to install dependencies from Conda first.

First we need to install some common dependencies.

$ conda install -c conda-forge numpy scipy numba networkx matplotlib jupyter scipy pandas scikit-learn

Then run

pip install ddn3

Alternatively, you can clone the repository, or just download or unzip it. Then we can install DDN 3.0.

$ pip install ./

Or you may want to install it in development mode.

$ pip install -e ./

Usage

This toy example generates two random datasets, and use estimate to estimate two networks, one for each dataset.

import numpy as np
from ddn import ddn
dat1 = np.random.randn(1000, 10)
dat2 = np.random.randn(1000, 10)
networks = ddn.ddn(dat1, dat2, lambda1=0.3, lambda2=0.1)

For more details and examples, check the documentation, which includes three tutorials and the API reference. The tutorials can also be found in the docs/notebooks folder.

Contributing

Please report bugs in the issues. You may also email the authors directly: Yingzhou Lu (lyz66@vt.edu), Yizhi Wang (yzwang@vt.edu), or Yue Wang (yuewang@vt.edu). If you are interested in adding features or fixing bug, feel free to contact us.

License

The ddn package is licensed under the terms of the MIT license.

Citations

[1] Zhang, Bai, and Yue Wang. "Learning structural changes of Gaussian graphical models in controlled experiments." arXiv preprint arXiv:1203.3532 (2012).

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

ddn3-0.1.0.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

ddn3-0.1.0-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

Details for the file ddn3-0.1.0.tar.gz.

File metadata

  • Download URL: ddn3-0.1.0.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.7 Windows/10

File hashes

Hashes for ddn3-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ba75361154a7036b90d82b2b2e1a82fa44820e35c208f7d5afb018c0d12a429e
MD5 9084a6f7a571b515166735e5b02dfee0
BLAKE2b-256 ca96736faa014e59ecce533648384a26af0a33fba4a35d3dad0154f4ddcada16

See more details on using hashes here.

File details

Details for the file ddn3-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ddn3-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.7 Windows/10

File hashes

Hashes for ddn3-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 26bb29cb013a19bd6a5ac4e5c06810ccdafae7dbc4a2465a8976a8b136745bbb
MD5 d65de84816917fc98a5ab5574ff4f7b4
BLAKE2b-256 2c0d646822f656e9b21258d24918cb3d9a78b907b4ddb904a2901d8536e5e89e

See more details on using hashes here.

Supported by

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