megadepth_cmd: Run Megadepth commands

View source: R/megadepth.R

megadepth_cmdR Documentation

Run Megadepth commands

Description

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

Usage

megadepth_cmd(...)

megadepth_shell(input = ".", ...)

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

  • megadepth_cmd(): Run an arbitrary Megadepth command.

  • megadepth_shell(): Run an arbitrary Megadepth command.

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


## 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")

LieberInstitute/megadepth documentation built on May 6, 2024, 7:12 p.m.