cat_or_zcat: select zstdcat, zcat, or cat

Description Usage Arguments Value Examples

View source: R/helpers.R

Description

Check the suffix of the filename and return one of zstdcat, zcat, or cat

Usage

1
2
3
4
cat_or_zcat(
  filename,
  configs = list(zstdcat.path = "zstdcat", zcat.path = "zcat")
)

Arguments

f

A file path.

Value

One of the following 3 commands: zstdcat, zcat, or cat.

Examples

1
2
3
4
5
6
7
8
cat_or_zcat("file.txt")
cat_or_zcat("file.txt.gz")
cat_or_zcat("file.txt.zst")
## Not run: 
cat_or_zcat(file_path)
fread(cmd = paste(cat_or_zcat(file_path), file_path))

## End(Not run)

rivas-lab/snpnet documentation built on Dec. 14, 2021, 3:22 a.m.