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

Added method to get vcf index file

parent c640dc87
......@@ -127,4 +127,11 @@ object VcfUtils {
def hasMinGenomeQuality(gt: Genotype, minGQ: Int): Boolean = {
gt.hasGQ && gt.getGQ >= minGQ
def getVcfIndexFile(vcfFile: File): File = {
val name = vcfFile.getAbsolutePath
if (name.endsWith(".vcf")) new File(name + ".idx")
else if (name.endsWith(".vcf.gz")) new File(name + ".tbi")
else throw new IllegalArgumentException(s"File given is no vcf file: $vcfFile")
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