If you are just wanted to convert the entire string to an Int, use score.toInt. Using score(0), calls apply() which return a single Char at that position, e.g. score(0).toInt will return the ascii value of the first Char of score.

Alternatively, if you are wanting to get the score from a particular offset, use something like...

def sangerScoreToInt (score: String, offset: Int): Int = score(offset).toInt -33