From: TZVanaalten Date: Thu, 24 Aug 2017 14:41:40 +0000 (+0100) Subject: JAL-2629 adjust log parameter slightly and reduce granularity X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=87b304d55f0dd005dd1d04cf162103bff4435a83;p=jalview.git JAL-2629 adjust log parameter slightly and reduce granularity --- diff --git a/src/jalview/gui/OptsAndParamsPage.java b/src/jalview/gui/OptsAndParamsPage.java index 44acdab..1505df8 100644 --- a/src/jalview/gui/OptsAndParamsPage.java +++ b/src/jalview/gui/OptsAndParamsPage.java @@ -589,7 +589,7 @@ public class OptsAndParamsPage Double base = ((LogarithmicParameter) parameter).getBase(); Double value = Math.pow( base, - slider.getValue()); + slider.getValue() / 1000000f); valueField.setText(formatDouble(value)); } checkIfModified(); @@ -599,7 +599,7 @@ public class OptsAndParamsPage public String formatDouble(Double value) { - String string = String.format("%2.3f", value); + String string = String.format("%3.3f", value); if (value < 0.001) { string = String.format("%3.3e", value); @@ -681,7 +681,7 @@ public class OptsAndParamsPage { Double base = ((LogarithmicParameter) parm).getBase(); Double value = Math.pow(base, - Double.parseDouble(parm.getValue())); + Double.parseDouble(parm.getValue()) / 1000000); valueField.setText(formatDouble(value)); } else @@ -750,7 +750,8 @@ public class OptsAndParamsPage eValue = Double.valueOf(valueField.getText()); dVal = Math.log(eValue) / Math - .log(((LogarithmicParameter) parameter).getBase()); + .log(((LogarithmicParameter) parameter).getBase()) + * 1000000; if (validator.getMin() != null && validator.getMin().doubleValue() > dVal) diff --git a/src/jalview/hmmer/HMMERParamStore.java b/src/jalview/hmmer/HMMERParamStore.java index ab33c95..a4bf8e4 100644 --- a/src/jalview/hmmer/HMMERParamStore.java +++ b/src/jalview/hmmer/HMMERParamStore.java @@ -117,7 +117,7 @@ public class HMMERParamStore implements ParamDatastoreI args.add(new LogarithmicParameter( MessageManager.getString("label.seq_e_value"), MessageManager.getString("label.seq_e_value_desc"), false, - -9.96578, -126d, 3.3219d, 2d)); + -3d, -37.92977945, 1d, 10d)); /* args.add(new DoubleParameter( MessageManager.getString("label.seq_score"), @@ -127,7 +127,7 @@ public class HMMERParamStore implements ParamDatastoreI args.add(new LogarithmicParameter( MessageManager.getString("label.dom_e_value_desc"), MessageManager.getString("label.dom_e_value_desc"), false, - -9.96578, -126d, 3.3219d, 2d)); + -3d, -37.92977945, 1d, 10d)); /* args.add(new DoubleParameter( MessageManager.getString("label.dom_score"), diff --git a/src/jalview/ws/params/simple/LogarithmicParameter.java b/src/jalview/ws/params/simple/LogarithmicParameter.java index 4944d6b..91ed03a 100644 --- a/src/jalview/ws/params/simple/LogarithmicParameter.java +++ b/src/jalview/ws/params/simple/LogarithmicParameter.java @@ -71,8 +71,8 @@ public class LogarithmicParameter extends Option implements ParameterI super(name, description, required, String.valueOf(defValue), null, null, null); defval = defValue; - this.min = min; - this.max = max; + this.min = min * 1000000; + this.max = max * 1000000; this.base = base; } @@ -83,8 +83,8 @@ public class LogarithmicParameter extends Option implements ParameterI super(name, description, required, String.valueOf(defValue), String.valueOf(value), null, null); defval = defValue; - this.min = min; - this.max = max; + this.min = min * 1000000; + this.max = max * 1000000; this.base = base; }