Get Salmon root directory

get_salmon_root(file, ...)

Arguments

file

character path to a Salmon output file, or a vector of files.

...

additional arguments are ignored.

Value

file path to the Salmon root directory, or NA if the Salmon root directory could not be found.

Details

This function uses the rprojroot package to find the root output directory of a Salmon quant analysis, looking for the file "cmd_info.json". If this file is not found, this function returns NULL.

See also

Other jam nextgen sequence functions: get_salmon_meta(), parse_salmon_flenfile(), save_salmon_qc_xlsx()

Examples

cmdinfopath <- system.file("data", "salmonOut", "cmd_info.json", package="platjam");
if (nchar(cmdinfopath) > 0) {
   get_salmon_root(cmdinfopath);
}
#> [1] "/private/var/folders/1v/hbvdjhy1293cvqlm7n6l_hxw0000gs/T/Rtmp7zZ5c6/temp_libpath123f74b32cd37/platjam/data/salmonOut"