Skip to content

Commit c81cca1

Browse files
author
Kari Stromhaug
committed
Fix a bug in Cigar class
1 parent 4b70dbb commit c81cca1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/scala/com/fulcrumgenomics/vcf/AssessPhasing.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ private[vcf] object PhaseCigar {
649649
assumeFixedAlleleOrder: Boolean = false): PhaseCigar = {
650650
val iter = pairedIterator.filter {
651651
// ensure the alleles are the same when both truth and call are called
652-
case ((Some(t: VCtx), Some(c: VCtx))) =>
652+
case (Some(t: VCtx), Some(c: VCtx)) =>
653653
!skipMismatchingAlleles || t.alleles.toSet == c.alleles.toSet
654654
case _ => true
655655
}.flatMap { case (t, c) => // collect metrics but only keep sites where either variant (i.e. truth or call) is phased.
@@ -793,8 +793,8 @@ private[vcf] object PhaseCigar {
793793
* [[Mismatch]] otherwise.
794794
*/
795795
private[vcf] def cigarTypeForVariantContexts(truth: Variant, call: Variant): PhaseCigarOp = {
796-
val truthAlleles = truth.gts.next().alleles.toSeq
797-
val calledAlleles = call.gts.next().alleles.toSeq
796+
val truthAlleles = truth.gts.next().calls.toSeq
797+
val calledAlleles = call.gts.next().calls.toSeq
798798
require(truthAlleles.length == calledAlleles.length)
799799
require(truthAlleles.length == 2)
800800
if (truthAlleles.head != calledAlleles.head || truthAlleles.last != calledAlleles.last) PhaseCigarOp.Mismatch

0 commit comments

Comments
 (0)