pgb_liv\php_ms\Core\Tolerance
Class to encapsulate tolerance values with their unit type.
- Author: Andrew Collins
Synopsis
- // constants
- const DA = 'Da';
- const PPM = 'ppm';
- const PSI_PPM_ACCESSION = 'UO:0000169';
- const PSI_DA_ACCESSION = 'UO:0000221';
- // members
- private $tolerance;
- private $unit;
- // methods
- public void __construct()
- public float getTolerance()
- public string getUnit()
- public float getDaltonDelta()
- public float getPpmDelta()
- public boolean isTolerable()
- public float getDifference()
- public static float getDifferencePpm()
Coverage
Methods | 100% | 8 / 8 |
Lines | 100% | 36 / 36 |
Violations
Checkstyle
Line | Column | Severity | Message |
---|---|---|---|
52 | 1 | error | Multi-line function call not indented correctly; expected 12 spaces but found 16 |
52 | 107 | error | Closing parenthesis of a multi-line function call must be on a line by itself |
68 | 1 | error | Multi-line function call not indented correctly; expected 16 spaces but found 20 |
68 | 92 | error | Closing parenthesis of a multi-line function call must be on a line by itself |
Constants
Name | Value |
---|---|
DA | 'Da' |
PPM | 'ppm' |
PSI_PPM_ACCESSION | 'UO:0000169' |
PSI_DA_ACCESSION | 'UO:0000221' |
Members
private
- $tolerance
- $unit
Methods
public
- __construct() — Creates a new instance of this object with a specified tolerance value and unit type
- getDaltonDelta() — Calculates the Dalton tolerance value of this mass using the set tolerance value
- getDifference() — Gets the difference between the observed and expected, and returns it depending on the instance unit
- getDifferencePpm() — Gets the ppm difference for the observed and expected value
- getPpmDelta() — Calculates the ppm tolerance value of this mass using the set tolerance value
- getTolerance() — Gets the numeric tolerance value.
- getUnit() — Gets the tolerance unit type, Tolerance::PPM or Tolerance::DA
- isTolerable() — Test if the observed and expected values are within the accepted tolerance
History
-
2019-04-02T13:48:22+01:00 (commit #f90fad3)
Author: detritus (detritus@blueyonder.co.uk) / Commiter: detritus (detritus@blueyonder.co.uk)
Code tidy
-
2019-04-02T11:54:45+01:00 (commit #c7d351b)
Author: detritus (detritus@blueyonder.co.uk) / Commiter: detritus (detritus@blueyonder.co.uk)
Code tidy
-
2017-12-19T15:28:53+00:00 (commit #218cf30)
Author: detritus (detritus@blueyonder.co.uk) / Commiter: detritus (detritus@blueyonder.co.uk)
Added methods to Tolerance for comparing two values
-
2017-09-27T11:40:12+01:00 (commit #a2a20e4)
Author: detritus (detritus@blueyonder.co.uk) / Commiter: detritus (detritus@blueyonder.co.uk)
Fixed Sonar issues Added support for replicates to merge MzML
-
2017-07-26T17:11:10+01:00 (commit #02a75db)
Author: Andrew Collins (detritus@blueyonder.co.uk) / Commiter: Andrew Collins (detritus@blueyonder.co.uk)
Fixed PEFF parser not parsing if keyword case is not exact Added support for calculating ppm delta from da tolerance
-
2017-04-18T17:01:19+01:00 (commit #6727a89)
Author: detritus (detritus@blueyonder.co.uk) / Commiter: detritus (detritus@blueyonder.co.uk)
Added additional MzIdentML parser support Partitioned code to allow branching between 1.1/1.2
-
2017-04-13T15:55:22+01:00 (commit #02f8b48)
Author: detritus (detritus@blueyonder.co.uk) / Commiter: detritus (detritus@blueyonder.co.uk)
Addded adapter code to translate between MzIdentML and MSGF params
-
2017-04-04T18:36:34+01:00 (commit #9969a66)
Author: Andrew Collins (detritus@blueyonder.co.uk) / Commiter: Andrew Collins (detritus@blueyonder.co.uk)
Added additional validation to MsgfPlus Params
-
2017-04-04T17:41:32+01:00 (commit #831a98c)
Author: Andrew Collins (detritus@blueyonder.co.uk) / Commiter: Andrew Collins (detritus@blueyonder.co.uk)
Required Search tolerances to use Tolerance class Added additional validation
-
2017-03-28T15:36:12+01:00 (commit #7197298)
Author: detritus (detritus@blueyonder.co.uk) / Commiter: detritus (detritus@blueyonder.co.uk)
Added tolerance class