Skip to content

Commit

Permalink
Index off by one for VCF genotype Number=A attributes.
Browse files Browse the repository at this point in the history
  • Loading branch information
heuermh authored and fnothaft committed Jun 14, 2017
1 parent ad5ae6d commit c78a0ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,7 @@ class VariantContextConverter(
case (false, VCFHeaderLineCount.A) => {
(g: HtsjdkGenotype, idx: Int, indices: Array[Int]) =>
{
fromArrayExtractor(g, id, toFn, idx)
fromArrayExtractor(g, id, toFn, idx - 1)
.map(kv => (kv._1, kv._2.toString))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2450,7 +2450,7 @@ class VariantContextConverterSuite extends ADAMFunSuite {
val vcb = htsjdkSNVBuilder
val gt = GenotypeBuilder.create("NA12878",
vcb.getAlleles(),
Map[String, java.lang.Object](("A_INT", "5,10,15,20")))
Map[String, java.lang.Object](("A_INT", "10,15,20")))
val vc = vcb.genotypes(gt)
.make

Expand Down

0 comments on commit c78a0ed

Please sign in to comment.