megadepth_cmd: Run Megadepth commands

Description Usage Arguments Value Functions References Examples

View source: R/megadepth.R

Description

Wrapper functions to run Megadepth commands via system2('megadepth', ...).

Usage

1
2
3

Arguments

...

Arguments to be passed to system2('megadepth', ...), e.g. annotation(path) is basically megadepth_cmd(c('--annotation', path)) (i.e. run the command megadepth --annotation path).

input

A character(1) with the path to the input BAM, BigWig or text file for Megadepth.

Value

See base::system2() for the types of output you can generate.

A character() with the capture of the standard output stream generated by Megadepth.

Functions

References

megadepth_cmd() is based on blogdown::hugo_cmd() which is available at https://github.com/rstudio/blogdown/blob/master/R/hugo.R.

megadepth_shell() is based on the shell_ls() example from cmdfun which is available at https://snystrom.github.io/cmdfun/index.html.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Install if necessary
install_megadepth()

## Find version
## megadepth_shell() provides an interface more familiar to R users
megadepth_shell(version = TRUE)
## megadepth_cmd() requires using directly the command line syntax for
## Megadepth
megadepth_cmd("--version", stdout = TRUE)

## Compare the help files:
# megadepth_shell() captures the standard output and returns a character()
# megadepth_cmd() shows the standard output on the console
megadepth_shell("--help")
megadepth_cmd("--help")

megadepth documentation built on Feb. 5, 2021, 2:03 a.m.