Don't hard-code base qual max

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2524 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2010-01-06 17:21:44 +00:00
parent 75809100c6
commit d6fb19bb67
1 changed files with 2 additions and 2 deletions

View File

@ -78,7 +78,7 @@ public class QualityUtils {
} }
/** /**
* Return a quality score, capped at 63. * Return a quality score, capped at max qual.
* *
* @param qual the uncapped quality score * @param qual the uncapped quality score
* @return the capped quality score * @return the capped quality score
@ -242,7 +242,7 @@ public class QualityUtils {
* @return Printable ASCII representation of phred score. * @return Printable ASCII representation of phred score.
*/ */
public static char phredToFastq(final int phredScore) { public static char phredToFastq(final int phredScore) {
if (phredScore < 0 || phredScore > 63) { if (phredScore < 0 || phredScore > MAX_QUAL_SCORE) {
throw new IllegalArgumentException("Cannot encode phred score: " + phredScore); throw new IllegalArgumentException("Cannot encode phred score: " + phredScore);
} }
return (char) (33 + phredScore); return (char) (33 + phredScore);