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 versions 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 issues with Numba in Windows.

DDN 3.0 can then be installed with the following 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 (https://github.com/cbil-vt/DDN3), or just download and 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 estimates 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.

Tests

To run tests, go to the folder of DDN3 source code, then run pytest.

pytest iddn_data

It will compare the output of DDN with reference values. It tests DDN with various acceleration strategies.

Experiments

The simulation-related code can be found at https://github.com/cbil-vt/DDN3_simulation. The results of the simulation and the figures are archived here: https://zenodo.org/records/10543473.

Contributing

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

License

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

Citations

[1] DDN3.0: Determining significant rewiring of biological network structure with differential dependency networks.

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-1.0.2.tar.gz (24.1 kB view details)

Uploaded Source

Built Distribution

ddn3-1.0.2-py3-none-any.whl (27.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ddn3-1.0.2.tar.gz
  • Upload date:
  • Size: 24.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Windows/10

File hashes

Hashes for ddn3-1.0.2.tar.gz
Algorithm Hash digest
SHA256 5ff98f1a41da4eee1b389d294df5ebc31142fe1002a731bed917f88edc569f5d
MD5 9c2787766dee6b810542569d0bb5698f
BLAKE2b-256 67e6873e39a1e8e14880617c015e8699cfb530c225f6290dbd1084df374a56c3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ddn3-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 27.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Windows/10

File hashes

Hashes for ddn3-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1a4ee4e41fa13a802c83867d58ef29cd8cd55bb7bfb380b58d02920addf340a6
MD5 4a37b8ad773772b6fea84373c4b6e1d3
BLAKE2b-256 caa9a93f1aaf31cdd45fc3c4f5415664956a41b444115c4abe12524d6a376c91

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