Learn R Programming

bedr (version 1.0.2)

tabix: Main bedtools wrapper function.

Description

Main bedtools wrapper function.

Usage

tabix( region, file.name, params = NULL, tmpDir = NULL, deleteTmpDir = TRUE, outputDir = NULL, outputFile = NULL, check.zero.based = TRUE, check.chr = TRUE, check.valid = TRUE, check.sort = TRUE, check.merge = TRUE, verbose = TRUE )

Arguments

region
The regions to query the tabix'd file
file.name
The name of the bzipped/indexed tabix file to query
params
A string that includes all the extra parameters and arguments to the bedtools commmand. For example if you wanted to do a left outer join you would specificy method as intersect and use params = c("-loj -header"). If you leave input and method as defaults then this is this string represents the full command.
tmpDir
The directory to be used for writing files
deleteTmpDir
Should tmp files be deleted. helpful for diagnostics.
outputDir
The output directory. Only used if outputFile is specified. It defaults to the current working directory.
outputFile
The name of the output file. If this is specified the output will be sent to a file not an R object
check.chr
check for chr prefix
check.zero.based
check for zero based coordinates
check.valid
do all region integrity checks
check.sort
check if region is sorted
check.merge
check if region is merged
verbose
Should messages be printed to screen.

Value

The output of command with some parsing to keep it consistent with the input.

See Also

genomicRanges

Examples

Run this code
if (check.binary("tabix")) {
query.regions <- c("1:1000-100000", "1:1000000-1100000")
cosmic.vcf.example <- system.file(
	"extdata/CosmicCodingMuts_v66_20130725_ex.vcf.gz",
	package = "bedr"
	)
cosmic.query <- tabix(query.regions, cosmic.vcf.example, check.chr = FALSE)
}

Run the code above in your browser using DataLab