Genotype API Documentation - v0.1.0
    Preparing search index...

    Function calculateAverageQuality

    • Calculate average quality score from a quality string

      Optimized for streaming with single-pass calculation.

      Parameters

      • quality: string

        ASCII quality string

      • encoding: QualityEncoding = "phred33"

        Quality encoding scheme

      Returns number

      Average quality score

      const avg = calculateAverageQuality('IIIIIIIIII', 'phred33'); // 40