From fd223e955cb5b16cf33c77db4e365c4fa0a9a8df Mon Sep 17 00:00:00 2001 From: rpoplin Date: Fri, 22 Jan 2010 20:55:28 +0000 Subject: [PATCH] Reverting the previous solid change. We now refuse to recalibrate if the solid read doesn't contain proper color space information. The exception message has been updated to say this. Also, Tile has been downgraded to an ExperimentalCovariate due to performance issues. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2662 348d0f76-0448-11de-a6fe-93d51630548a --- .../walkers/recalibration/RecalDataManager.java | 13 +++---------- .../gatk/walkers/recalibration/TileCovariate.java | 2 +- 2 files changed, 4 insertions(+), 11 deletions(-) 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 1ccf40a13..dd0047d44 100644 --- a/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/RecalDataManager.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/RecalDataManager.java @@ -259,10 +259,6 @@ 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())); @@ -308,16 +304,12 @@ 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())); } - // 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(); final byte[] colorImpliedBases = readBases.clone(); char[] refBasesDirRead = AlignmentUtils.alignmentToCharArray( read.getCigar(), read.getReadString().toCharArray(), refBases ); //BUGBUG: This needs to change when read walkers are changed to give the aligned refBases @@ -475,7 +467,8 @@ public class RecalDataManager { case '3': // simple complement return BaseUtils.simpleComplement( prevBase ); default: - throw new StingException( "Unrecognized color space in SOLID read, color = " + color ); + throw new StingException( "Unrecognized color space in SOLID read, color = " + color + + " Unfortunately this bam file can not be recalibrated without full color space information because of potential reference bias."); } } diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/TileCovariate.java b/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/TileCovariate.java index 03434be12..efd09bdec 100644 --- a/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/TileCovariate.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/TileCovariate.java @@ -32,7 +32,7 @@ import edu.mit.broad.picard.illumina.parser.IlluminaUtil; * @author alecw@broadinstitute.org */ -public class TileCovariate implements StandardCovariate { +public class TileCovariate implements ExperimentalCovariate { private static boolean exceptionWhenNoTile = false;