This repository hosts notebooks, images, and data for the XSwap project. The results of these analyses are described in the manuscript titled:
The probability of edge existence due to node degree: a baseline for network-based predictions
Along with the manuscript, this project produced an open-source implementation of our network permutation algorithm.
Available on PyPI as xswap
and source on GitHub in hetio/xswap.
The analyses for this repository are performed by sequentially numbered Jupyter notebooks in the nb
directory.
Data is written to the data
directory and figures are exported to the img
directory.
The analyses depend on the Hetionet HetMat dataset, which can be downloaded by running the following Python command from this repo's root directory:
from hetmatpy.hetmat.archive import load_archive
load_archive(
archive_path="https://github.com/hetio/hetionet/raw/b467b8b41087288390b41fdb796577ada9f03bda/hetnet/matrix/hetionet-v1.0.hetmat.zip",
destination_dir="data/task1/hetionet-v1.0.hetmat",
)
This repository uses conda to manage its environment as specified in environment.yml
.
Install the environment with:
# install new xswap-analysis environment
conda env create --file=environment.yml
# update existing xswap-analysis environment
conda env update --file=environment.yml
# export the locked environment specification, which lists every package
# installed in the environment including implicit dependencies.
# Includes build numbers and is operating system specific.
conda env export --name=xswap-analysis > environment-lock-linux.yml
Then use conda activate xswap-analysis
and conda deactivate
to activate or deactivate the environment.
The entire repository is released under a BSD 3-Clause License. Furthermore:
data
directory are released under CC0 (public domain dedication).img
directory are released under CC BY 4.0 (public domain dedication).
For images that are used in the xswap-manuscript,
please attribute this manuscript as the source.