Report feature group data (legacy interface)
Source:R/generics.R, R/report-legacy.R
reporting-legacy.RdFunctionality to report data produced by most workflow steps such as features, feature groups, calculated chemical formulae and tentatively identified compounds. This is the legacy interface, for the updated interface see reporting.
Usage
reportCSV(
fGroups,
path = "report",
reportFeatures = FALSE,
formulas = NULL,
formulasNormalizeScores = "max",
formulasExclNormScores = NULL,
compounds = NULL,
compoundsNormalizeScores = "max",
compoundsExclNormScores = c("score", "individualMoNAScore", "annoTypeCount",
"annotHitCount", "libMatch"),
compsCluster = NULL,
components = NULL,
retMin = TRUE,
clearPath = FALSE
)
reportPDF(
fGroups,
path = "report",
reportFGroups = TRUE,
formulas = NULL,
formulasTopMost = 5,
formulasNormalizeScores = "max",
formulasExclNormScores = NULL,
reportFormulaSpectra = TRUE,
compounds = NULL,
compoundsNormalizeScores = "max",
compoundsExclNormScores = c("score", "individualMoNAScore", "annoTypeCount",
"annotHitCount", "libMatch"),
compoundsOnlyUsedScorings = TRUE,
compoundsTopMost = 5,
compsCluster = NULL,
components = NULL,
MSPeakLists = NULL,
retMin = TRUE,
EICGrid = c(2, 1),
EICParams = getDefEICParams(window = 20, topMost = 1, topMostByReplicate = TRUE),
clearPath = FALSE
)
# S4 method for class 'featureGroups'
reportCSV(
fGroups,
path = "report",
reportFeatures = FALSE,
formulas = NULL,
formulasNormalizeScores = "max",
formulasExclNormScores = NULL,
compounds = NULL,
compoundsNormalizeScores = "max",
compoundsExclNormScores = c("score", "individualMoNAScore", "annoTypeCount",
"annotHitCount", "libMatch"),
compsCluster = NULL,
components = NULL,
retMin = TRUE,
clearPath = FALSE
)
# S4 method for class 'featureGroups'
reportPDF(
fGroups,
path = "report",
reportFGroups = TRUE,
formulas = NULL,
formulasTopMost = 5,
formulasNormalizeScores = "max",
formulasExclNormScores = NULL,
reportFormulaSpectra = TRUE,
compounds = NULL,
compoundsNormalizeScores = "max",
compoundsExclNormScores = c("score", "individualMoNAScore", "annoTypeCount",
"annotHitCount", "libMatch"),
compoundsOnlyUsedScorings = TRUE,
compoundsTopMost = 5,
compsCluster = NULL,
components = NULL,
MSPeakLists = NULL,
retMin = TRUE,
EICGrid = c(2, 1),
EICParams = getDefEICParams(),
clearPath = FALSE
)Arguments
- fGroups
The
featureGroupsobject that should be used for reporting data.- path
The destination file path for files generated during reporting. Will be generated if needed.
- reportFeatures
If set to
TRUEthen for each analysis a.csvfile will be generated with information about its detected features.- formulas, compounds, compsCluster, components
Further objects (
formulas,compounds,compoundsCluster,components) that should be reported. SpecifyNULLto skip reporting a particular object.- compoundsNormalizeScores, formulasNormalizeScores
A
characterthat specifies how normalization of annotation scorings occurs. Either"none"(no normalization),"max"(normalize to max value) or"minmax"(perform min-max normalization). Note that normalization of negative scores (e.g. output bySIRIUS) is always performed as min-max. Furthermore, currently normalization forcompoundstakes the original min/max scoring values into account when candidates were generated. Thus, forcompoundsscoring, normalization is not affected when candidate results were removed after they were generated (e.g. by use offilter).- compoundsExclNormScores, formulasExclNormScores
A
charactervector specifying any compound scoring names that should not be normalized. Set toNULLto normalize all scorings. Note that whether any normalization occurs is set by thecompoundsExclNormScores,formulasExclNormScoresargument.For
compounds: By defaultscoreandindividualMoNAScoreare set to mimic the behavior of theMetFragweb interface.- retMin
If
TRUEthen report retention times in minutes (otherwise seconds).- clearPath
If
TRUEthen the destination path will be (recursively) removed prior to reporting.- reportFGroups
If
TRUEthen feature group data will be reported.- formulasTopMost, compoundsTopMost
Only this amount of top ranked candidate formulae/compounds are reported. Lower values may significantly speed up reporting. Set to
NULLto ignore.- reportFormulaSpectra
If
TRUEthen explained MS/MS spectra (if available) for candidate formulae will be reported. Specifyingformulasand setting this argument toFALSEstill allows further annotation of compound MS/MS spectra.- compoundsOnlyUsedScorings
If
TRUEthen only scorings are plotted that actually have been used to rank data (see thescoreTypesargument togenerateCompoundsMetFragfor more details).- MSPeakLists
A
MSPeakListsobject that is mandatory when spectra for formulae and/or compounds will be reported.- EICGrid
An integer vector in the form
c(columns, rows)that is used to determine the plotting grid when reporting EICs in PDF files.- EICParams
A named
listwith parameters used for extracted ion chromatogram (EIC) creation. See the EIC parameters documentation for more details.
Details
These functions are usually called at the very end of the workflow. It is used to report various data on features and
feature groups. In addition, these functions may be used for reporting formulae and/or compounds that were generated
for the specified feature groups. Data can be reported in tabular form (i.e. .csv files) by
reportCSV or graphically by reportPDF and reportHTML. The latter functions will plot for
instance chromatograms and annotated mass spectra, which are useful to get a graphical overview of results.
All functions have a wide variety of arguments that influence the reporting process. Nevertheless, most parameters are optional and only required to be given for fine tuning. In addition, only those objects (e.g. formulae, compounds, clustering) that are desired to be reported need to be specified.
reportCSV generates tabular data (i.e. .csv
files) for given data to be reported. This may also be useful to allow
import by other tools for post processing.
reportPDF will report graphical data (e.g. chromatograms and mass spectra) within PDF files.
Compared to reportHTML this function may be faster and yield smaller report files, however, its
functionality is a bit more basic and generated data is more 'scattered' around.
Note
Any formulae and compounds for feature groups which are not present within fGroups (i.e. because
it has been subset afterwards) will not be reported.
The topMost, topMostByReplicate and onlyPresent EIC parameters may be ignored,
e.g., when generating overview plots.
Use of raw HRMS data
The raw data interface of patRoon is used by the report functions to process HRMS (or IMS-HRMS) data. Please see its documentation for more information on the supported formats and available configuration options.