Commit 362cdb39 authored by cfrainay's avatar cfrainay
Browse files

[Toolbox] replace edge redundancy with neighbor coupling in SideCompoundScan

It bears the same idea, while being theoretically more accurate, and is less correlated with the degree measure already present
parent 423b83d4
......@@ -50,7 +50,7 @@ public class SideCompoundsScan extends AbstractMet4jApplication {
@Option(name = "-uf", aliases = {"--undefinedFormula"}, usage = "flag as side compound any compounds with no valid chemical formula")
public Boolean flagNoFormula = false;
@Option(name = "-er", aliases = {"--edgeRedundancy"}, usage = "flag as side compound any compound with a number of redundancy in incident edges (parallel edges connecting to the same neighbor) above the given threshold")
@Option(name = "-nc", aliases = {"--neighborCoupling"}, usage = "flag as side compound any compound with a number of parallel edges shared with a neighbor above the given threshold")
public double parallelEdge = Double.NaN;
enum strategy {by_name,by_id}
......@@ -129,7 +129,7 @@ public class SideCompoundsScan extends AbstractMet4jApplication {
if (reportValue) {
StringBuffer l = new StringBuffer("ID\tNAME");
l.append("\tDEGREE");
if (!Double.isNaN(parallelEdge)) l.append("\tINCIDENT_PARALLEL_EDGES");
if (!Double.isNaN(parallelEdge)) l.append("\tMAX_PARALLEL_EDGES");
if (flagInorganic) l.append("\tNO_CARBON_BOND");
if (flagNoFormula) l.append("\tVALID_CHEMICAL");
l.append("\tIS_SIDE\n");
......@@ -153,12 +153,16 @@ public class SideCompoundsScan extends AbstractMet4jApplication {
if (sideFromDegree) side = true;
if (reportValue) l.append("\t" + d);
//check parallel edge ratio
//check parallel edges
if (!Double.isNaN(parallelEdge)) {
int ipe = graph.edgesOf(v).size() - graph.neighborListOf(v).size();
boolean sideFromParallel = (ipe > parallelEdge);
int maxIpe = 0;
for(BioMetabolite n : graph.neighborListOf(v)){
int e = graph.getAllEdges(v,n).size()+graph.getAllEdges(n,v).size();
if(e>maxIpe) maxIpe=e;
}
boolean sideFromParallel = (maxIpe > parallelEdge);
if (sideFromParallel) side = true;
if (reportValue) l.append("\t" + ipe);
if (reportValue) l.append("\t" + maxIpe);
}
//check formula
......@@ -219,9 +223,9 @@ public class SideCompoundsScan extends AbstractMet4jApplication {
"This tool attempts to propose a list of side compounds according to specific criteria: \n" +
"- *Degree*: Compounds with an uncommonly high number of neighbors can betray a lack of process specificity. \n" +
"High degree compounds typically include water and most main cofactors (CoA, ATP, NADPH...) but can also include central compounds such as pyruvate or acetyl-CoA \n" +
"- *Edge Redundancy*: Similar to degree, this criteria assume that side compounds are involved in many reactions, but in pairs with other side compounds.\n" +
"- *Neighbor Coupling*: Similar to degree, this criteria assume that side compounds are involved in many reactions, but in pairs with other side compounds.\n" +
"Therefore, the transition from ATP to ADP will appear multiple time in the network, creating redundant 'parallel edges' between these two neighbors.\n" +
"Having a high number of redundancy, i.e. edges that don't extends one's neighborhood, can point out cofactors while keeping converging pathways' products like pyruvate aside. \n" +
"Being tightly coupled to another compound through a high number of redundant edges, can point out cofactors while keeping converging pathways' products with high degree like pyruvate aside. \n" +
"- *Carbon Count*: Metabolic \"waste\", or degradation end-product such as ammonia or carbon dioxide are usually considered as side compounds.\n" +
"Most of them are inorganic compound, another ill-defined concept, sometimes defined as compound lacking C-C or C-H bonds. Since chemical structure is rarely available " +
"in SBML model beyond chemical formula, we use a less restrictive criterion by flagging compound with one or no carbons. This cover most inorganic compounds, but include few compounds" +
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment