setup_tool: Setup PATH to Genomic CLI Tools

Description Usage Arguments Details

View source: R/setup_tools.R

Description

This function is meant to provide guidance for users to set up the path to the executables for the various command-line tools as global options in their .Rprofile located in the users HOME directory (Sys.getenv('HOME')). Follow the instructions provided in the console for proper configuration.

The user must indicate which tool path is being set, and also the path to the tool. The function will first verify that the executable file exists, and if so, will open up the users .Rprofile and provide the necessary code to declare the option. NOTE: If the clipr package is installed, the code block will be automatically copied to the clipboard for easy pasting into the .Rprofile.

Usage

1
2
setup_tool(which = c("plink", "plink2", "snptest", "gtool", "gcta"),
  path)

Arguments

which

Which genomic tool path is being set?

path

Path to the executable.

Details

If the user needs help identifying the location of the executable, you can try typing which tool into a shell/terminal on either Mac OS or Linux, for Windows, if you are using a shell emulator like MobaXterm, git bash, or similar, also type which tool. To attempt to find the path using Windows cmd prompt, type where tool. However, often the exectuables for these tools are not in your native search path, and you will need to locate the path of the exectuable manually (wherever you saved/stored the executable).

For some R users Sys.which('tool') may provide the path to the executable without needing to try the terminal. However, if you have environment variables (i.e. $PATH) setup in your .bash_profile or .bashrc which directs the terminal to the location of the tool, R does not have access to this variable natively and will not locate the executable.


mattwarkentin/genetools documentation built on Nov. 4, 2019, 6:19 p.m.