run_vcf_index: Compress and index vcf files

View source: R/run_vcf_index.R

run_vcf_indexR Documentation

Compress and index vcf files

Description

Compress and index vcf files

Usage

run_vcf_index(
  input = NULL,
  type = NULL,
  parallel = FALSE,
  cores = 4,
  execute = TRUE,
  bgzip = NULL,
  tabix = NULL
)

Arguments

input

List of vcf files to index

type

File type for indexing, e.g. "vcf"

parallel

Run in parallel, default set to FALSE

cores

Number of cores/threads to use for parallel processing, default set to 4

execute

Whether to execute the commands or not, default set to TRUE

bgzip

Path to the bgzip program, required

tabix

Path to the tabix program, required

Value

A list with the indexing commands

Examples

## Not run: 
bgzip.path <- "/software/htslib-1.9/bin/bgzip"
tabix.path <- "/software/htslib-1.9/bin/tabix"

vcf.files <- c("file1.vcf","file2.vcf")

file.type <- "vcf"

index.vcf.cmds <- run_vcf_index(input = vcf.files,
                                type = file.type,
                                execute = FALSE,
                                bgzip = bgzip.path,
                                tabix = tabix.path)

## End(Not run)


GrahamHamilton/pipelineTools documentation built on March 5, 2024, 12:23 p.m.