get_salmon_meta | R Documentation |
Get Salmon metadata and aux info into a data.frame
get_salmon_meta(metafile, exclude_hashes = TRUE, ...)
metafile |
character vector of one or more files, usually the
full file path to the |
exclude_hashes |
logical indicating whether to drop columns that contain file hashes. |
... |
additional arguments are ignored. |
This function takes a file path to one or more Salmon
output files, uses that path to locate the full set of
available files, loads data from each of the discovered
files, and returns the results in a data.frame
format.
This function uses rprojroot::find_root()
to find the
root directory, defined as the directory that contains
the file "cmd_info.json"
. The path to "meta_info.json"
is constructed relative to that location.
Recognized files:
meta_info.json
- typically in a subdirectory aux_info/meta_info.json
cmd_info.json
- typically in the same directory as the aux_info
directory.
If a relative path to "cmd_info.json"
cannot be determined, this
function returns NULL
.
When the input metafile
includes multiple files, only
the unique Salmon root directories are returned.
This function uses jsonlite
to read each JSON file, which
is converted to a data.frame
. Any JSON fields that contain
multiple values are comma-delimited using jamba::cPaste()
in order to fit on one row in the data.frame
.
data.frame
whose number of rows is equal to the number
of unique Salmon root directories in the input metafile
.
For any input metafile
not found, the output is NULL
.
Other jam nextgen sequence functions:
get_salmon_root()
,
parse_salmon_flenfile()
,
save_salmon_qc_xlsx()
cmdinfopath <- system.file("data", "salmonOut", "cmd_info.json", package="platjam");
if (nchar(cmdinfopath) > 0) {
get_salmon_meta(cmdinfopath);
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.