Java Number Round roundPhred(final double value, final double phredScorePrecision)

Here you can find the source of roundPhred(final double value, final double phredScorePrecision)

Description

Round a Phred scaled score to precision phredScorePrecision

License

Open Source License

Parameter

Parameter Description
value raw Phred score
phredScorePrecision Phred score precision

Return

rounded Phred score

Declaration

public static double roundPhred(final double value, final double phredScorePrecision) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**// w  ww  . j a v  a 2 s.  co  m
     * Round a Phred scaled score to precision {@code phredScorePrecision}
     *
     * @param value raw Phred score
     * @param phredScorePrecision Phred score precision
     * @return rounded Phred score
     */
    public static double roundPhred(final double value, final double phredScorePrecision) {
        return Math.round(value / phredScorePrecision) * phredScorePrecision;
    }
}

Related

  1. roundOff(double fraction, int precision)
  2. roundOffAmt(double dAmt)
  3. roundOffFileCount(int fileCount)
  4. roundOffTo2DecPlaces(double val)
  5. roundOffValues(double[] doubles)
  6. roundPos(final float a)
  7. roundPositive(float value)
  8. roundPositive(float x)
  9. roundPositiveIntToPowerOf2(int i)