dagr.tasks.misc.Tabix.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dagr-tasks_2.12 Show documentation
Show all versions of dagr-tasks_2.12 Show documentation
A set of example dagr tasks.
The newest version!
package dagr.tasks.misc
import dagr.core.config.Configuration
import dagr.core.tasksystem.ShellCommand
import dagr.tasks.DagrDef
import DagrDef.PathToVcf
import java.nio.file.Path
/** Tabix (https://github.com/samtools/htslib) */
object Tabix extends Configuration {
val TabixExecutableConfigKey = "tabix.executable"
def findTabix: Path = configureExecutable(TabixExecutableConfigKey, "tabix")
}
/** Indexes a VCF.gz using tabix */
class IndexVcfGz(val vcf: PathToVcf)
extends ShellCommand(Tabix.findTabix.toAbsolutePath.toString, "-p", "vcf", vcf.toAbsolutePath.toString)