def qual_chars2nums(qual_chars, qual_format):
    """
    This converts the phred qualities from the ASCII format to numbers.
    
    :param qual_chars: phred score in ASCII format (str).
    :param qual_format: phred score in numbers (list).
    """
    qual_nums = []
    for char in qual_chars.rstrip('\n'):
        qual_nums.append(ord(char) - qual_format)
    return qual_nums
