1
1
package org .baderlab .csplugins .enrichmentmap .style ;
2
2
3
+ import static org .baderlab .csplugins .enrichmentmap .style .EMStyleBuilder .Columns .EDGE_CUTOFF_TYPE ;
4
+ import static org .baderlab .csplugins .enrichmentmap .style .EMStyleBuilder .Columns .EDGE_HYPERGEOM_CUTOFF ;
5
+ import static org .baderlab .csplugins .enrichmentmap .style .EMStyleBuilder .Columns .EDGE_HYPERGEOM_PVALUE ;
6
+ import static org .baderlab .csplugins .enrichmentmap .style .EMStyleBuilder .Columns .EDGE_MANN_WHIT_CUTOFF ;
7
+ import static org .baderlab .csplugins .enrichmentmap .style .EMStyleBuilder .Columns .EDGE_MANN_WHIT_GREATER_PVALUE ;
8
+ import static org .baderlab .csplugins .enrichmentmap .style .EMStyleBuilder .Columns .EDGE_MANN_WHIT_LESS_PVALUE ;
9
+ import static org .baderlab .csplugins .enrichmentmap .style .EMStyleBuilder .Columns .EDGE_MANN_WHIT_TWOSIDED_PVALUE ;
10
+ import static org .baderlab .csplugins .enrichmentmap .style .EMStyleBuilder .Columns .EDGE_SIMILARITY_COEFF ;
11
+ import static org .baderlab .csplugins .enrichmentmap .style .EMStyleBuilder .Columns .EDGE_WIDTH_FORMULA_COLUMN ;
12
+ import static org .baderlab .csplugins .enrichmentmap .style .EMStyleBuilder .Columns .NETWORK_EDGE_WIDTH_PARAMETERS_COLUMN ;
13
+
3
14
import org .baderlab .csplugins .enrichmentmap .CytoscapeServiceModule .Continuous ;
4
15
import org .baderlab .csplugins .enrichmentmap .model .EnrichmentMap ;
5
16
import org .baderlab .csplugins .enrichmentmap .model .EnrichmentMapManager ;
6
17
import org .baderlab .csplugins .enrichmentmap .model .PostAnalysisFilterType ;
7
18
import org .baderlab .csplugins .enrichmentmap .model .PostAnalysisParameters ;
8
- import org .baderlab .csplugins .enrichmentmap .style .EMStyleBuilder .Columns ;
9
19
import org .cytoscape .model .CyEdge ;
10
20
import org .cytoscape .model .CyNetwork ;
11
21
import org .cytoscape .model .CyRow ;
@@ -26,13 +36,6 @@ public class WidthFunction {
26
36
public static final double DEFAULT_WIDTH_PA_LESS_THAN_10 = 4.5 ;
27
37
public static final double DEFAULT_WIDTH_PA_GREATER = 1.0 ;
28
38
29
-
30
- // Column in edge table that holds the formula
31
- public static final ColumnDescriptor <Double > EDGE_WIDTH_FORMULA_COLUMN = new ColumnDescriptor <>("Edge_width_formula" , Double .class );
32
- // Column in network table that holds the edge parameters
33
- public static final ColumnDescriptor <String > NETWORK_EDGE_WIDTH_PARAMETERS_COLUMN = new ColumnDescriptor <>("EM_Edge_width_parameters" , String .class );
34
-
35
-
36
39
private final VisualMappingFunctionFactory vmfFactoryContinuous ;
37
40
private final EnrichmentMapManager emManager ;
38
41
@@ -81,7 +84,7 @@ private void calculateAndSetEdgeWidths(CyNetwork network, String prefix, TaskMon
81
84
String interaction = row .get (CyEdge .INTERACTION , String .class );
82
85
83
86
if (isSignature (interaction )) {
84
- String cutoffType = Columns . EDGE_CUTOFF_TYPE .get (row , prefix , null );
87
+ String cutoffType = EDGE_CUTOFF_TYPE .get (row , prefix , null );
85
88
PostAnalysisFilterType filterType = PostAnalysisFilterType .fromDisplayString (cutoffType );
86
89
87
90
if (filterType == null ) {
@@ -92,20 +95,20 @@ private void calculateAndSetEdgeWidths(CyNetwork network, String prefix, TaskMon
92
95
Double pvalue , cutoff ;
93
96
switch (filterType ) {
94
97
case MANN_WHIT_TWO_SIDED :
95
- pvalue = Columns . EDGE_MANN_WHIT_TWOSIDED_PVALUE .get (row , prefix );
96
- cutoff = Columns . EDGE_MANN_WHIT_CUTOFF .get (row , prefix );
98
+ pvalue = EDGE_MANN_WHIT_TWOSIDED_PVALUE .get (row , prefix );
99
+ cutoff = EDGE_MANN_WHIT_CUTOFF .get (row , prefix );
97
100
break ;
98
101
case MANN_WHIT_GREATER :
99
- pvalue = Columns . EDGE_MANN_WHIT_GREATER_PVALUE .get (row , prefix );
100
- cutoff = Columns . EDGE_MANN_WHIT_CUTOFF .get (row , prefix );
102
+ pvalue = EDGE_MANN_WHIT_GREATER_PVALUE .get (row , prefix );
103
+ cutoff = EDGE_MANN_WHIT_CUTOFF .get (row , prefix );
101
104
break ;
102
105
case MANN_WHIT_LESS :
103
- pvalue = Columns . EDGE_MANN_WHIT_LESS_PVALUE .get (row , prefix );
104
- cutoff = Columns . EDGE_MANN_WHIT_CUTOFF .get (row , prefix );
106
+ pvalue = EDGE_MANN_WHIT_LESS_PVALUE .get (row , prefix );
107
+ cutoff = EDGE_MANN_WHIT_CUTOFF .get (row , prefix );
105
108
break ;
106
109
default :
107
- pvalue = Columns . EDGE_HYPERGEOM_PVALUE .get (row , prefix );
108
- cutoff = Columns . EDGE_HYPERGEOM_CUTOFF .get (row , prefix );
110
+ pvalue = EDGE_HYPERGEOM_PVALUE .get (row , prefix );
111
+ cutoff = EDGE_HYPERGEOM_CUTOFF .get (row , prefix );
109
112
break ;
110
113
}
111
114
@@ -122,7 +125,7 @@ private void calculateAndSetEdgeWidths(CyNetwork network, String prefix, TaskMon
122
125
// Can use a continuous mapping object to perform calculation
123
126
// even though it won't be added to the visual style.
124
127
ContinuousMapping <Double , Double > conmapping_edgewidth = (ContinuousMapping <Double , Double >) vmfFactoryContinuous
125
- .createVisualMappingFunction (prefix + Columns . EDGE_SIMILARITY_COEFF , Double .class ,
128
+ .createVisualMappingFunction (prefix + EDGE_SIMILARITY_COEFF , Double .class ,
126
129
BasicVisualLexicon .EDGE_WIDTH );
127
130
128
131
Double under_width = 0.5 ;
0 commit comments