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

    Function percentAboveThreshold

    • Find the percentage of bases above a quality threshold

      Useful for quality control metrics like Q20 or Q30 percentages.

      Parameters

      • quality: string

        ASCII quality string

      • threshold: number

        Minimum quality score

      • encoding: QualityEncoding = "phred33"

        Quality encoding scheme

      Returns number

      Percentage of bases above threshold (0-100)

      const q30Percent = percentAboveThreshold('IIIIIGGGGFFFFF', 30, 'phred33');
      console.log(`Q30: ${q30Percent.toFixed(1)}%`); // Percentage of Q30+ bases