diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/RecalDataManager.java b/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/RecalDataManager.java index 114b2672b..1ccf40a13 100644 --- a/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/RecalDataManager.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/RecalDataManager.java @@ -259,12 +259,16 @@ public class RecalDataManager { if( attr != null ) { char[] colorSpace; if( attr instanceof String ) { + if( ((String)attr).contains(".") ) { // empty color space, abort + read.getReadGroup().setPlatform("illumina"); + return; + } colorSpace = ((String)attr).toCharArray(); } else { throw new StingException(String.format("Value encoded by %s in %s isn't a string!", RecalDataManager.COLOR_SPACE_ATTRIBUTE_TAG, read.getReadName())); } - // Loop over the read and calculate first the infered bases from the color and then check if it is consistent with the read + // Loop over the read and calculate first the inferred bases from the color and then check if it is consistent with the read byte[] readBases = read.getReadBases(); if( read.getReadNegativeStrandFlag() ) { readBases = BaseUtils.simpleReverseComplement( read.getReadBases() ); @@ -304,6 +308,10 @@ public class RecalDataManager { if( attr != null ) { char[] colorSpace; if( attr instanceof String ) { + if( ((String)attr).contains(".") ) { // empty color space, abort + read.getReadGroup().setPlatform("illumina"); + return originalQualScores; + } colorSpace = ((String)attr).toCharArray(); } else { throw new StingException(String.format("Value encoded by %s in %s isn't a string!", RecalDataManager.COLOR_SPACE_ATTRIBUTE_TAG, read.getReadName()));