import: Imports a htslib-compatible variant-call file into Tomahawk

Description Usage Arguments Value Author(s) See Also Examples

Description

Some additional details about this S4 generic and its methods. The extra blank line between this section and the title is critical for roxygen2 to differentiate the title from the description section.

Usage

1
2
3
import(input = "character", output = "character",
  missingness = "numeric", block_size = "integer",
  compression_level = "integer", filter_univariate = "logical", ...)

Arguments

input

Input string pointing to the htslib-compatible file.

output

Output string pointing to the Tomahawk file.

block_size

Advanced use: number of variants packed in each internal Tomahawk block. This could have potential impact on the parallel throughput capabilities of Tomahawk on large cohorts.

compression_level

Compressing level in the range [1, 22] for compressing the Tomahawk file. Larger numbers results in smaller resting file size at the expense of importing speeds. Decompressing speeds are largely unaffected by the compression level.

filter_univariate

Logical (boolean) flag set to TRUE if univariate (monomorphic) should be filtered out. If this flag is set to FALSE then monomorphic sites are left in the file. The recommendation is to remove these as they contribute no information.

missnigness

Numerical value in the range [0, 1] representing the largest fraction of missing values that are allowed. If the threshold is violated then the variant site is filtered out.

Value

Returns a twk class with the file handle pointing to the newly imported Tomahawk file.

Author(s)

Marcus D. R. Klarqvist <mk819@cam.ac.uk> | <https://mdrk.me>

See Also

twk_data, twk_header, twk_filter, and twk

Examples

1
2
3
4
# This example assumes you have a Tomahawk file called "1kgp3_chr20.bcf" in
# your current working directory.
twk <- import("1kgp3_chr20.bcf","~/Downloads/1kgp3_chr20")
twk

mklarqvist/rtomahawk documentation built on May 16, 2019, 5:01 a.m.