Skip to main content
`Ctrl`+`K`

# cogent3.core.alphabet.make_qual_converter

make_qual_converter(scoring_scheme: PhredEncoding | str = PhredEncoding.PHRED_33) → bytes_to_array

  make a converter from fastq quality ASCII bytes to numpy uint8 scores.

  Parameters:
    scoring_scheme

      the fastq quality encoding scheme. Either a `PhredEncoding` member or one of the string values `"phred+33"` or `"phred+64"` (case insensitive).

  Raises:
    NotImplementedError

      if `scoring_scheme` is not a supported scheme.

  Notes

  The returned converter maps the ASCII range valid for the encoding onto consecutive numpy.uint8 quality scores starting at zero. Pass it as the qual_converter argument to cogent3.parse.fastq.iter_fastq_records to obtain quality scores as numpy arrays while iterating fastq records.