Skip array needs to also be used in the updateDataForRead function of the delocalized BQSR.

This commit is contained in:
Ryan Poplin 2012-09-04 10:33:37 -04:00
parent ff6ebbf3fd
commit c9944d81ef
3 changed files with 40 additions and 38 deletions

View File

@ -106,8 +106,9 @@ public class AdvancedRecalibrationEngine extends StandardRecalibrationEngine imp
} }
@Override @Override
public synchronized void updateDataForRead(final GATKSAMRecord read, final double[] snpErrors, final double[] insertionErrors, final double[] deletionErrors ) { public synchronized void updateDataForRead(final GATKSAMRecord read, final boolean[] skip, final double[] snpErrors, final double[] insertionErrors, final double[] deletionErrors ) {
for( int offset = 0; offset < read.getReadBases().length; offset++ ) { for( int offset = 0; offset < read.getReadBases().length; offset++ ) {
if( !skip[offset] ) {
final ReadCovariates readCovariates = covariateKeySetFrom(read); final ReadCovariates readCovariates = covariateKeySetFrom(read);
tempQualArray[EventType.BASE_SUBSTITUTION.index] = read.getBaseQualities()[offset]; tempQualArray[EventType.BASE_SUBSTITUTION.index] = read.getBaseQualities()[offset];
@ -152,3 +153,4 @@ public class AdvancedRecalibrationEngine extends StandardRecalibrationEngine imp
} }
} }
} }
}

View File

@ -35,5 +35,5 @@ public interface RecalibrationEngine {
public void updateDataForPileupElement(final PileupElement pileupElement, final byte refBase); public void updateDataForPileupElement(final PileupElement pileupElement, final byte refBase);
public void updateDataForRead(final GATKSAMRecord read, final double[] snpErrors, final double[] insertionErrors, final double[] deletionErrors); public void updateDataForRead(final GATKSAMRecord read, final boolean[] skip, final double[] snpErrors, final double[] insertionErrors, final double[] deletionErrors);
} }

View File

@ -93,7 +93,7 @@ public class StandardRecalibrationEngine implements RecalibrationEngine, PublicP
} }
@Override @Override
public synchronized void updateDataForRead( final GATKSAMRecord read, final double[] snpErrors, final double[] insertionErrors, final double[] deletionErrors ) { public synchronized void updateDataForRead( final GATKSAMRecord read, final boolean[] skip, final double[] snpErrors, final double[] insertionErrors, final double[] deletionErrors ) {
throw new UnsupportedOperationException("Delocalized BQSR is not available in the GATK-lite version"); throw new UnsupportedOperationException("Delocalized BQSR is not available in the GATK-lite version");
} }