Fix for Solid reads that have '.' in their color space field. The recalibrator will just set them to be illumina reads and won't apply color space correction.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2661 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
2ea768d902
commit
7732f98e56
|
|
@ -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()));
|
||||
|
|
|
|||
Loading…
Reference in New Issue