From df998041a829e2f783fc150038a589b071910256 Mon Sep 17 00:00:00 2001 From: rpoplin Date: Fri, 15 Jan 2010 16:31:25 +0000 Subject: [PATCH] Minor change to solid warning message. Added note for a future solid recalibration integration test when we get the required data file. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2590 348d0f76-0448-11de-a6fe-93d51630548a --- .../walkers/recalibration/RecalDataManager.java | 14 ++++++++------ .../RecalibrationWalkersIntegrationTest.java | 3 +++ 2 files changed, 11 insertions(+), 6 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 41ed957b7..9c88e46db 100644 --- a/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/RecalDataManager.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/RecalDataManager.java @@ -57,7 +57,7 @@ public class RecalDataManager { private static boolean warnUserNullReadGroup = false; private static boolean warnUserNoColorSpace = false; - public static final String versionString = "v2.2.10"; // Major version, minor version, and build number + public static final String versionString = "v2.2.11"; // Major version, minor version, and build number RecalDataManager() { data = new NestedHashMap(); @@ -251,6 +251,7 @@ public class RecalDataManager { * @param read The SAMRecord to parse */ public static void parseColorSpace( final SAMRecord read ) { + // If this is a SOLID read then we have to check if the color space is inconsistent. This is our only sign that SOLID has inserted the reference base if( read.getReadGroup().getPlatform().equalsIgnoreCase("SOLID") ) { if( read.getAttribute(RecalDataManager.COLOR_SPACE_INCONSISTENCY_TAG) == null ) { // Haven't calculated the inconsistency array yet for this read @@ -279,8 +280,8 @@ public class RecalDataManager { read.setAttribute( RecalDataManager.COLOR_SPACE_INCONSISTENCY_TAG, inconsistency ); } else if ( !warnUserNoColorSpace ) { // Warn the user if we can't find the color space tag - Utils.warnUser("Unable to find color space information in SOLID read. First observed at read with name = " + read.getReadName()); - Utils.warnUser("This calculation is critically dependent on being able to know when reference bases were inserted into the SOLID read. Are you sure you want to proceed?"); + Utils.warnUser("Unable to find color space information in SOLiD read. First observed at read with name = " + read.getReadName()); + Utils.warnUser("This calculation is critically dependent on being able to know when reference bases were inserted into SOLiD reads. Are you sure you want to proceed?"); warnUserNoColorSpace = true; } } @@ -337,14 +338,14 @@ public class RecalDataManager { } } else if ( !warnUserNoColorSpace ) { // Warn the user if we can't find the color space tag - Utils.warnUser("Unable to find color space information in SOLID read. First observed at read with name = " + read.getReadName()); - Utils.warnUser("This calculation is critically dependent on being able to know when reference bases were inserted into the SOLID read. Are you sure you want to proceed?"); + Utils.warnUser("Unable to find color space information in SOLiD read. First observed at read with name = " + read.getReadName()); + Utils.warnUser("This calculation is critically dependent on being able to know when reference bases were inserted into SOLiD reads. Are you sure you want to proceed?"); warnUserNoColorSpace = true; } + return originalQualScores; } - /** * Perform the SET_Q_ZERO solid recalibration. Inconsistent color space bases and their previous base are set to quality zero * @param read The SAMRecord to recalibrate @@ -378,6 +379,7 @@ public class RecalDataManager { readBases = BaseUtils.simpleReverseComplement( readBases.clone() ); // Put the bases back in reverse order to stuff them back in the read } read.setReadBases( readBases ); + return originalQualScores; } diff --git a/java/test/org/broadinstitute/sting/gatk/walkers/recalibration/RecalibrationWalkersIntegrationTest.java b/java/test/org/broadinstitute/sting/gatk/walkers/recalibration/RecalibrationWalkersIntegrationTest.java index 901819f5f..971e5a8f1 100755 --- a/java/test/org/broadinstitute/sting/gatk/walkers/recalibration/RecalibrationWalkersIntegrationTest.java +++ b/java/test/org/broadinstitute/sting/gatk/walkers/recalibration/RecalibrationWalkersIntegrationTest.java @@ -107,6 +107,9 @@ public class RecalibrationWalkersIntegrationTest extends WalkerTest { } } + //TODO -- Add an integration test which tests SOLiD files that contain indels to make sure the Cigar string is processed correctly in the solid_recal_modes + // Currently we don't have any such data + @Test public void testCountCovariatesVCF() { HashMap e = new HashMap();