@@ -154,6 +154,9 @@ public class EMBuildCommandTask extends AbstractTask {
154
154
@ Tunable (description = "Similarity Coeffecient" , groups = { "User Input" , "Parameters" }, gravity = 20.0 , tooltip = "coeffecient between 0 and 1." )
155
155
public ListSingleSelection <String > coefficients ;
156
156
157
+ @ Tunable (description = "Deprecated, use 'coefficients' instead." )
158
+ public ListSingleSelection <String > coeffecients ; // misspelled, but must keep for backwards compatibility
159
+
157
160
@ Tunable
158
161
public double combinedConstant = LegacySupport .combinedConstant_default ;
159
162
@@ -185,21 +188,38 @@ public EMBuildCommandTask() {
185
188
coefficients = new ListSingleSelection <String >(EnrichmentMapParameters .SM_OVERLAP ,
186
189
EnrichmentMapParameters .SM_JACCARD , EnrichmentMapParameters .SM_COMBINED );
187
190
191
+ coeffecients = new ListSingleSelection <String >("null" , EnrichmentMapParameters .SM_OVERLAP ,
192
+ EnrichmentMapParameters .SM_JACCARD , EnrichmentMapParameters .SM_COMBINED );
193
+
194
+
188
195
edgeStrategy = ResolverCommandTask .enumNames (EdgeStrategy .values ());
189
196
edgeStrategy .setSelectedValue (EdgeStrategy .AUTOMATIC .name ());
190
197
191
198
nesFilter = ResolverCommandTask .enumNames (NESFilter .values ());
192
199
nesFilter .setSelectedValue (NESFilter .ALL .name ());
193
200
}
201
+
194
202
203
+ private SimilarityMetric getSimilarityMetric () {
204
+ String value ;
205
+ if (!"null" .equals (coeffecients .getSelectedValue ())) {
206
+ // the old field overrides the new field
207
+ value = coeffecients .getSelectedValue ();
208
+ } else {
209
+ value = coefficients .getSelectedValue ();
210
+ }
211
+
212
+ return EnrichmentMapParameters .stringToSimilarityMetric (value );
213
+ }
214
+
195
215
196
216
/**
197
217
* buildEnrichmentMap - parses all GSEA input files and creates an enrichment map
198
218
*/
199
219
public void buildEnrichmentMap () {
200
220
// Note we must continue to use the old constants from EnrichmentMapParameters for backwards compatibility
201
221
Method method = EnrichmentMapParameters .stringToMethod (analysisType .getSelectedValue ());
202
- SimilarityMetric metric = EnrichmentMapParameters . stringToSimilarityMetric ( coefficients . getSelectedValue () );
222
+ SimilarityMetric metric = getSimilarityMetric ( );
203
223
204
224
//Set Dataset1 Files
205
225
DataSetFiles dataset1files = new DataSetFiles ();
0 commit comments