Class AbstractSimpleLaneTest

    • Constructor Detail

      • AbstractSimpleLaneTest

        protected AbstractSimpleLaneTest​(String name,
                                         String description,
                                         String columnName)
        Constructor that set the field of this abstract test.
        Parameters:
        name - name of the test
        description - description of the test
        columnName - column name of the test
      • AbstractSimpleLaneTest

        protected AbstractSimpleLaneTest​(String name,
                                         String description,
                                         String columnName,
                                         String unit)
        Constructor that set the field of this abstract test.
        Parameters:
        name - name of the test
        description - description of the test
        columnName - column name of the test
        unit - unit of the test
    • Method Detail

      • getKey

        protected abstract String getKey​(int read,
                                         boolean indexedRead,
                                         int lane)
        Get the the key in the RunData object for the value to test.
        Parameters:
        read - index of the read
        indexedRead - true if the read is indexed
        lane - index of the lane
        Returns:
        a String with the required key
      • transformValue

        protected Number transformValue​(Number value,
                                        RunData data,
                                        int read,
                                        boolean indexedRead,
                                        int lane)
        Transform the value.
        Parameters:
        value - value to transform
        data - run data
        read - index of read
        lane - lane index
        indexedRead - true if the read is indexed
        Returns:
        the transformed value
      • isValuePercent

        protected boolean isValuePercent()
        Test if the value is a percent.
        Returns:
        true if the value is a percent
      • getValueType

        protected abstract Class<?> getValueType()
        Get the type of the value.
        Returns:
        a Class object with the type
      • test

        public TestResult test​(RunData data,
                               int read,
                               boolean indexedRead,
                               int lane)
        Description copied from interface: LaneTest
        Do a test.
        Parameters:
        data - result object
        read - index of read
        indexedRead - true if the read is an index read
        lane - the index of the lane
        Returns:
        a TestResult object with the result of the test
      • testIndexedRead

        protected boolean testIndexedRead()
        Test if indexed read test must return a score >=0.
        Returns:
        if indexed read must return a score