d4_create: Create d4 file(s) from inputs

Description Usage Arguments Details Value additional arguments Examples

View source: R/create.R

Description

This function will create a new d4 file for each file passed to input. Additional command arguments can be passed to ... to configure

Usage

1
d4_create(input, output = NULL, ..., d4tools = NULL)

Arguments

input

path to BigWig, BAM, or CRAM files to convert to d4.

output

path to save d4 output. If unset, the file is named identically and in the same path as the input file, but with the .d4 extension.

...

see additional arguments table below for valid arguments

d4tools

path to d4tools (or use options("d4tools" = "path/to/d4tools"))

Details

Note there is no type checking on inputs, so using inputs with heterogeneous file types may produce unintended consequences when using file-type specific arguments in ....

Value

path to new d4 object

additional arguments

name data type description
deflate logical(1) Enable deflate compression
dict_auto logical(1) Automatically determine dictionary type by random sampling
dump_dict logical(1) do not profile BAM file, only dump dictionary
sparse logical(1) Sparse mode, same as deflate = TRUE, dict_range = "0-1". Enables secondary table compression and disable primary table
deflate_level integer(1) Configure the deflate algorithm, default 5
dict_file character(1) Path to a file defining the values of the dictionary
dict_range character(1) Dictionary specification as a range: "a-b" encoding values from A to B (exclusive)
filter character(1) A regex matching the genome name should present in the output file (note: use a shell regex, not R-style regexes)
genome character(1) genome description file (Used by BED inputs)
mapping_qual integer(1) minimal mapping quality (only valid with CRAM/BAM inputs)
ref character(1) path to reference genome file (only used with CRAM inputs)
threads integer(1) number of threads to use for encoding

Examples

1
2
3
4
5
6
7
8
## Not run: 
# Will create "example.d4"
d4_create("example.fq")

# Explicit naming is done by passing a name to "output"
d4_create("example.fq", "my_new_file.d4")

## End(Not run)

snystrom/rd4tools documentation built on Dec. 31, 2020, 7:29 a.m.