Class BclQualityEvaluationStrategy


  • public class BclQualityEvaluationStrategy
    extends Object
    Describes a mechanism for revising and evaluating qualities read from a BCL file. This class accumulates observations about low quality scores that it evaluates, so distinct instances should be used for unrelated sets of BCL readers. The mechanism for revising qualities is not configurable. The qualities that are less than 1 are revised to 1, and other qualities are not affected. This class is thread-safe and a single instance can and should be passed to BclReaders running in separate threads. To replicate the functionality of BclReaders prior to the introduction of this class, create a single instance passing ILLUMINA_ALLEGED_MINIMUM_QUALITY to the constructor, and then call assertMinimumQualities() once the readers finish their work.
    • Field Detail

      • ILLUMINA_ALLEGED_MINIMUM_QUALITY

        public static final int ILLUMINA_ALLEGED_MINIMUM_QUALITY
        See Also:
        Constant Field Values
    • Constructor Detail

      • BclQualityEvaluationStrategy

        public BclQualityEvaluationStrategy​(int minimumRevisedQuality)
        Parameters:
        minimumRevisedQuality - The minimum quality that should be seen from revised qualities; controls whether or not an exception is thrown when calling assertMinimumQualities()
    • Method Detail

      • reviseAndConditionallyLogQuality

        public byte reviseAndConditionallyLogQuality​(byte quality)
        Accepts a quality read from a BCL file and (1) returns a 1 if the value was 0 and (2) makes a note of the provided quality if it is low. Because of (2) each record's quality should be passed only once to this method, otherwise it will be observed multiple times.
        Parameters:
        quality - The quality score read from the BCL
        Returns:
        The revised new quality score
      • assertMinimumQualities

        public void assertMinimumQualities()
        Reviews the qualities observed thus far and throws an exception if any are below the minimum quality threshold.
      • getPoorQualityFrequencies

        public Map<Byte,​Integer> getPoorQualityFrequencies()
        Returns a view of number of qualities that failed, where the key is the quality score and the value is the number of observations.