Commit 9c002013 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Fixed bug

parent 180bb97e
...@@ -263,7 +263,7 @@ object VcfFilter extends ToolCommand { ...@@ -263,7 +263,7 @@ object VcfFilter extends ToolCommand {
def minAlternateDepth(record: VariantContext, minAlternateDepth: Int, minSamplesPass: Int = 1): Boolean = { def minAlternateDepth(record: VariantContext, minAlternateDepth: Int, minSamplesPass: Int = 1): Boolean = {
record.getGenotypes.count(genotype => { record.getGenotypes.count(genotype => {
val AD = if (genotype.hasAD) List(genotype.getAD: _*) else Nil val AD = if (genotype.hasAD) List(genotype.getAD: _*) else Nil
if (AD.nonEmpty) AD.tail.count(_ >= minAlternateDepth) > 0 else true if (AD.nonEmpty && minAlternateDepth >= 0) AD.tail.count(_ >= minAlternateDepth) > 0 else true
}) >= minSamplesPass }) >= minSamplesPass
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment