Don't die when a readgroup is absent from the covariates table - it could
happen when all reads are unmapped (or have MQ0); instead, just don't alter the quals. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1394 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
089dab00e2
commit
02f1af0743
|
|
@ -292,7 +292,16 @@ public class TableRecalibrationWalker extends ReadWalker<SAMRecord, SAMFileWrite
|
|||
|
||||
byte[] recalQuals = new byte[quals.length];
|
||||
RecalMapping mapper = cache.get(readGroup);
|
||||
if ( mapper == null ) { throw new StingException(String.format("BUG: couldn't find RecalMapping for readgroup %s", readGroup)); }
|
||||
if ( mapper == null ) {
|
||||
// throw new StingException(String.format("BUG: couldn't find RecalMapping for readgroup %s", readGroup));
|
||||
// Edited by ebanks on 8/9/09
|
||||
// Actually, there is a valid case when the mapper == null: when all reads in a RG are
|
||||
// unmapped or have mapping quality == 0. In this case, we don't want to die - nor do we
|
||||
// want to lose these reads - so we just don't alter the quals
|
||||
for ( int cycle = 0; cycle < bases.length; cycle++ )
|
||||
recalQuals[cycle] = quals[cycle];
|
||||
return recalQuals;
|
||||
}
|
||||
|
||||
recalQuals[0] = quals[0]; // can't change the first -- no dinuc
|
||||
for ( int cycle = 1; cycle < bases.length; cycle++ ) { // skip first and last base, qual already set because no dinuc
|
||||
|
|
|
|||
Loading…
Reference in New Issue