report | R Documentation |
Functionality to report data produced by most workflow steps such as features, feature groups, formula and compound annotations, and TPs.
report(
fGroups,
MSPeakLists = NULL,
formulas = NULL,
compounds = NULL,
compsCluster = NULL,
components = NULL,
TPs = NULL,
settingsFile = system.file("report", "settings.yml", package = "patRoon"),
path = NULL,
EICParams = getDefEICParams(topMost = 1, topMostByRGroup = TRUE),
specSimParams = getDefSpecSimParams(),
clearPath = FALSE,
openReport = TRUE,
parallel = TRUE,
overrideSettings = list()
)
## S4 method for signature 'featureGroups'
report(
fGroups,
MSPeakLists = NULL,
formulas = NULL,
compounds = NULL,
compsCluster = NULL,
components = NULL,
TPs = NULL,
settingsFile = system.file("report", "settings.yml", package = "patRoon"),
path = NULL,
EICParams = getDefEICParams(topMost = 1, topMostByRGroup = TRUE),
specSimParams = getDefSpecSimParams(),
clearPath = FALSE,
openReport = TRUE,
parallel = TRUE,
overrideSettings = list()
)
genReportSettingsFile(out = "report.yml", baseFrom = NULL)
fGroups |
The |
MSPeakLists , formulas , compounds , compsCluster , components , TPs |
Further objects ( |
settingsFile |
The path to the report settings file used for report configuration (see |
path |
The destination file path for files generated during reporting. Will be generated if needed. If
|
EICParams |
A named |
specSimParams |
A named |
clearPath |
If |
openReport |
If set to |
parallel |
If set to |
overrideSettings |
A |
out |
The output file path. |
baseFrom |
An existing report file to which the report settings should be based from. This is primarily used to update old settings files: the output settings file will be based on the old settings and amended with any missing. |
The reporting functionality is typically used at the very end of the workflow. It is used to overview the data generated during the workflow, such as features, their annotations and TP screening results.
report
reports all workflow data in an interactive HTML file. The reports include both
tabular data (e.g. retention times, annotation properties, screening results) and varios plots (e.g.
chromatograms, (annotated) mass spectra and many more). This function uses functionality from other R packages,
such as rmarkdown, flexdashboard, knitr and bslib.
The genReportSettingsFile
function generates a new template ‘YAML’ file to configure report
settings (see the next section).
The report generation can be customized with a variety of settings that are read from a
‘YAML’ file. This is especially useful if you want to change more advanced settings or want to add or remove
the parts that are reported The report settings file is specified through the settingsFile
argument. If not
specified then default settings will be used. To ease creation of a new template settings file, the
genReportSettingsFile
function can be used.
The following settings are currently available:
General
format
: the report format. Currently this can only be "html"
.
path
: the destination path (ignored if the path
argument is specified).
keepUnusedPlots
: the number of days that unused plot files are kept (see Plot file caching
).
selfContained
: If true
then the output ‘report.html’ embeds all graphics and script
dependencies. Otherwise these files are read from the report_files/
directory. Self-contained reports are
easily shared, since only the ‘report.html’ needs to be copied. However, they may be slower to generate and
render, especially when the report contains a lot of data.
noDate
Set to true
to omit the date from the report. Mainly used for internal purposes.
summary
: defines the plots on the summary page: chord
, venn
and/or upset
.
features
retMin
: if true
then retention times are reported in minutes.
chromatograms
large
: inclusion of large chromatograms (used in feature group table and TP parent chromatogram
view).
small
: inclusion of small chromatograms (feature group table).
features
: inclusion of chromatograms for individual features (features view). Set to all
to also include plots for analyses in which a feature was not found (or removed afterwards).
intMax
: Method to determine the maximum intensity plot range: eic
or feature
.
Sets the intMax
argument to plotChroms
.
intensityPlots
: inclusion of intensity trend plots.
MSPeakLists
spectra
: inclusion of MS and MS/MS spectra (not annotated).
formulas
include
: whether formula results are reported (formula view). If false
then the input
formulas
object is still used to amend e.g. compound annotated spectra.
normalizeScores
, exclNormScores
: controls score normalization, sets the equally named
arguments to e.g. plotScores
.
topMost
only report this number of top ranked candidates. This number can be lowered to speed-up
report generation.
compounds
normalizeScores
, exclNormScores
, topMost
: same as formulas
, see above.
TPs
graphs
: inclusion of TP hierarchy graphs (generated with plotGraph
).
graphStructuresMax
: maximum number of structures to plot in hierarchy graphs (sets
structuresMax
argument of plotGraph
).
internalStandards
graph
: inclusion of internal standard network plot
(plotGraph
).
When a new report is generated the plot files are stored inside the report_files
sub-directory inside the destination path of the report. The plot files are kept so they can be reused to speed-up
re-creation of reports (e.g. with different report settings). After the report is generated, any unused plot
files are removed unless they were recently created (controlled by the keepUnusedPlots
setting, see previous
section). The clearPath
argument can be used to completely remove any old files.
No data will be reported for feature groups in any of the reported objects (formulas
, compounds
etc) which are not present in the input featureGroups
object (fGroups
).
The topMost
, topMostByRGroup
and onlyPresent
EIC parameters may be ignored,
e.g., when generating overview plots.
Creating MetFrag landing page URLs based on code from
MetFamily R package.
\addCitationsknitr2
\addCitationsknitr3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.