Skip to content

Commit

Permalink
[query] Better message for LocalLDPrune only taking diploid calls (#1…
Browse files Browse the repository at this point in the history
…3031)

resolves #12971
  • Loading branch information
chrisvittal authored May 12, 2023
1 parent e553ebc commit 2fa23a8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hail/src/main/scala/is/hail/methods/LocalLDPrune.scala
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ class BitPackedVectorBuilder(nSamples: Int) {

def addGT(call: Int): Unit = {
require(idx < nSamples)
require(Call.isDiploid(call))
if (!Call.isDiploid(call)) {
fatal(s"hail LD prune does not support non-diploid calls, found ${Call.toString(call)}")
}
val gt = Call.nNonRefAlleles(call)
pack = pack | ((gt & 3).toLong << packOffset)

Expand Down

0 comments on commit 2fa23a8

Please sign in to comment.