oxygraphis
A small crate and command line tool to interact with bipartite ecological graphs.
Currently you will need to clone this repository and build from source. Never fear, just download the rust toolchain. Then:
```bash git clone https://github.com/Euphrasiologist/oxygraphis cd oxygraphis
cargo install --path=. ```
Bipartite graphs are the graph of interest. Analyse these graphs directly, or simulate them.
```bash Usage: oxygraphis [COMMAND]
Commands: bipartite Generate and analyse bipartite graphs. simulate Simulate a number of graphs, and return calculations over the samples. help Print this message or the help of the given subcommand(s)
Options: -h, --help Print help information -V, --version Print version information ```
The bipartite
subcommand.
```bash Generate and analyse bipartite graphs.
Usage: oxygraphis bipartite [OPTIONS]
Commands: interaction-matrix Coerce a bipartite graph into an interaction matrix. derived-graphs Coerce a bipartite graph into two derived graphs. modularity Derive the modularity of a bipartite graph. help Print this message or the help of the given subcommand(s)
Arguments:
Options: -p, --plotbp Render an SVG bipartite graph plot. -d, --degreedistribution Return the degree distribution of a bipartite graph. -b, --bivariatedistribution Return the bivariate degree distribution of a bipartite graph. -h, --help Print help information ```
The input must be a delimited file with three columns only:
txt
from to weight
Sp1 Sp2 1.0
Sp2 Sp3 1.0
Sp1 Sp3 1.0
And I guess should be bipartite in structure (i.e. edges only from stratum 1 -> stratum 2). A warning is issued if it isn't, but does not halt the program.
Derived graphs are graphs which show the relationships between species in a stratum.
```bash Coerce a bipartite graph into two derived graphs.
Usage: oxygraphis bipartite
Options:
-p, --plotdg Render an SVG derived graph of a stratum.
-s, --stratum [
These form the core of some interesting bipartite analyses. Essentially an n x m
matrix of all possible species-species interactions in the network.
```bash Coerce a bipartite graph into an interaction matrix.
Usage: oxygraphis bipartite
Options: --print Print the inner matrix as a TSV. Mainly for debugging. -p, --plotim Render an SVG interaction matrix plot. -n, --nodf Compute the NODF number of a sorted interaction matrix. -h, --help Print help information ```
An algorithm operating on the interaction matrix made from a bipartite graph. It attempts to find modules of species-host interactions in a matrix.
```bash Derive the modularity of a bipartite graph.
Usage: oxygraphis bipartite
Options: -l, --lpawbplus Compute the modularity of a bipartite network using LPAwb+ algorithm. -d, --dirtlpawbplus Compute the modularity of a bipartite network using DIRTLPAwb+ algorithm. -p, --plotmod Plot the interaction matrix of a bipartite network, sorted to maximise modularity. -h, --help Print help information ```
A subcommand to simulate a number of random graphs (Erdös-Rényi) and execute a calculation on each.
```bash Simulate a number of graphs, and return calculations over the samples.
Usage: oxygraphis simulate [OPTIONS] --parasitenumber
Options:
--parasitenumber
Oxygraphis is one of only 5-6 genera in the flowering plants which have graph included fully in the name. It's in the Ranunculaceae.