Authors: James Bannon, Julia Nguyen, Matthew Boccalon, Jermiah Joseph
Contact: bhklab.jermiahjoseph@gmail.com
Description: Agony implementation
The notion of graph agony was developed out of a desire to find hierarchies in directed networks [2]. Intuitively, a hierarchy -- in an organization or social network, for example -- involves assigning levels or ranks to people such that the ranks are ordered. For example, the CEO of a company should rank higher than an intern.
Agony works by trying to find a hierarchy that best reflects that structure of a given directed network. At a very high level the algorithms in [2], [3], and [4] operate on the same way:
-
Input: A directed graph
$G=(V,E)$ . -
Output: A rank function
$r^*:V\to \mathbb{N}$ , and a value$A(G)$ that is the agony of the graph$G$ .
The values of
where
The most immediate next steps involve implementing the ability to compute the weighted and unweighted versions of agony as described in [3] and [4], respectively. We should do this at least in first in pure python. Below are some next steps along with tentative assignments to project members.
TO DO:
- Read over Tiers for Peers [4] and define the most general form of the agony problem. (James)
- Re-write the linear program agony code such that it's more readable. (James)
- Write the
C++code inpythonlikely using theheapqmodule for the priority queue.Ralso has a priority queue implemented. (James, Jermiah, Matthew) - De-bug and benchmark the
pythonimplementation against itsC++counterpart. (Jermiah, Matthew) - Investigate the weighted agony algorithm defined in [4]. (James, Jermiah, Matthew). The author of [4] has made a C++ implementation available. The files are also in this repo in the
agony_cppfolder.
If we can write a decent python and/or R package we can release it as its own software paper. It might be worth talking to Ben about this because it's not clear if re-writing publicly available code is a worthy paper. That said, making a library available publicly in pure python or R is maybe worth circulating/publishing as a matter of record.
The way I see it, there are two ways that we can proceed with a PGx style paper. One way involves using the agony itself as a biomarker. The second involves using agony for rank aggregation.
In the unweighted case, the agony is bounded above by
-
Pick a collection of samples that can be easily and meaningfully partitioned (e.g., responders vs. nonresponders to ICIs, cancer vs. normal samples).
-
For each group construct a directed gene regulatory network (GRN) using one of the existing methods: [1], [5], [8], [9]
-
Compare the agony for the graphs across the two groups.
Alternatively we could do this on a patient-level by looking at single-cell GRN inference ([7]). Another option would be to look at the agony of cell-cell communication networks [11].
This is as presented in the PGx meeting. K-Nearest neighbors using, e.g.[10].
Pixi is required to run this project. If you haven't installed it yet, follow these instructions
- Clone this repository to your local machine
- Navigate to the project directory
- Set up the environment using Pixi:
pixi installagony bindings are available in the agony module.
I've setup two tasks to showcase this
pixi run helppixi run cycle_dfsClick here to view the full documentation.
^[This paper introduces a novel algorithm based on the φ-mixing coefficient from probability theory to infer genome-wide interaction networks. The method allows for the construction of weighted and directed networks that can contain cycles, and it has been applied to study subtypes of lung cancer, including small cell (SCLC) and non-small cell (NSCLC), as well as normal lung tissue. There is a github repo with an implementation that is a combination of C and Matlab.]
^The authors define a measure of hierarchy within directed online social networks and present an efficient algorithm to compute this measure. This work provides insights into the structural organization of social networks and how hierarchical relationships can be identified and quantified. oai_citation:0‡ACM Digital Library
^This paper presents an improved algorithm for computing "agony," a metric used to quantify the hierarchical structure in directed graphs. The proposed method reduces the computational complexity from O(nm²) to O(m²), making it more practical for analyzing large-scale networks. oai_citation:1‡arXiv
^Building upon the concept of agony, this study extends the approach to weighted networks and introduces constraints on the number of hierarchical levels. The authors connect the problem to the capacitated circulation problem and provide both exact and heuristic solutions, demonstrating efficiency in handling large datasets.
^The paper proposes the Context-Based Dependency Network (CBDN) method to reconstruct directed gene regulatory networks using solely gene expression data. This approach addresses the challenge of inferring regulatory directions without additional data, such as eQTLs or gene knock-out experiments, which are often unavailable for human tissue samples.
^[ranked stochastic block models]
^[A paper that infers single cell gene regulatory networks. ]
^[The GENIE3 algorithm for inferring directed gene regulatory networks. There exists a github repo with implementations in C, R, Matlab, and python. This is used in the SCENIC pipeline.]
^[Another algorithm for inferring directed gene regulatory networks from gene expression.]
^[a Deep Learning/AI paper for learning patient similarity.]
[11.] Screening cell–cell communication in spatial transcriptomics via collective optimal transport
^[cell cell coms]
^[cell disorder]