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

    Function calculateErrorRate

    • Calculate average error rate for a quality string

      Converts each quality score to error probability and computes the mean.

      Parameters

      • quality: string

        ASCII quality string

      • encoding: QualityEncoding = "phred33"

        Quality encoding scheme

      Returns number

      Average error rate (0-1)

      const errorRate = calculateErrorRate('IIIIGGGGFFFF', 'phred33');
      console.log(`Average error rate: ${(errorRate * 100).toFixed(2)}%`);