Skip to content

Commit

Permalink
[ADAM-1488] Only increment BQSR min quality by 33 once.
Browse files Browse the repository at this point in the history
  • Loading branch information
fnothaft authored and heuermh committed Apr 14, 2017
1 parent 6c32a02 commit 04444aa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Expand Up @@ -645,7 +645,7 @@ case class AlignmentRecordRDD(
replaceRdd(BaseQualityRecalibration(rdd,
knownSnps,
recordGroups,
(minAcceptableQuality + 33).toChar,
minAcceptableQuality,
optStorageLevel))
}

Expand Down
Expand Up @@ -49,7 +49,7 @@ private[adam] case class RecalibrationTable private[recalibration] (
var idx = 0
while (idx < numCovariates) {
val key = covariates(idx)
newQuals(idx) = table.getOrElse(key, key.quality)
newQuals(idx) = table.getOrElse(key.toDefault, key.quality)
idx += 1
}
}
Expand Down Expand Up @@ -200,7 +200,7 @@ private[recalibration] object RecalibrationTable {
val recalibrationQualityMappings = InvertingRecalibrationTable.time {
observed.entries
.keys
.map(key => (key, tt.lookup(key)))
.map(key => (key.toDefault, tt.lookup(key)))
.toMap
}

Expand Down
Expand Up @@ -66,7 +66,7 @@ private[recalibration] case class Recalibrator(
covariates: Array[CovariateKey]): String = ComputeQualityScore.time {
val origQuals = read.getQual
val quals = new StringBuilder(origQuals)
val newQuals = table(covariates.map(_.toDefault))
val newQuals = table(covariates)
var idx = 0
while (idx < origQuals.length) {
// Keep original quality score if below recalibration threshold
Expand Down

0 comments on commit 04444aa

Please sign in to comment.