5.8 Interactively explore and review data
The checkFeatures
and checkComponents
functions start a graphical user interface (GUI) which allows you to interactively explore and review feature and components data, respectively.
checkFeatures(fGroups) # inspect features and feature groups
checkComponents(componCAM, fGroups) # inspect components
Both functions allow you to easily explore the data in an interactive way. Furthermore, these functions allow you to remove unwanted data. This is useful to remove for example features that are actually noise and feature groups that shouldn’t be in the same component. To remove an unwanted feature, feature group or components, simply uncheck its ‘keep’ checkbox. The next step is to save the selections you made. A check session is a file that stores which data should be removed. Once the session file is saved the filter
function can be used to actually remove the data:
fGroupsF <- filter(fGroups, checkFeaturesSession = TRUE)
componCAMF <- filter(componCAM, checkComponentsSession = TRUE)
If you saved the session and you re-launch the GUI it will restore the selections made earlier. The clearSession
argument can be used to fully clear a session before starting the GUI, hence, all the data will be restored to their ‘keep state’.
It is also possible to use multiple different sessions. This is especially useful if you do not want to overwrite previous session data or want to inspect different objects. In this case the session file name should be specified:
checkFeatures(fGroups, "mysession.yml")
fGroupsF <- filter(fGroups, checkFeaturesSession = "mysession.yml")
The default session names are "checked-features.yml"
and "checked-components.yml"
for feature and component data, respectively.
The extension of session file names is .yml
since the YAML file format is used. An advantage of this format is that it is easily readable and editable with a text editor.
Note that the session data is tied to the feature group names of your data. This means that, for instance, when you re-group your feature data after changing some parameters, the session data you prepared earlier cannot be used anymore. Since probably quite some manual work went into creating the session file, a special function is available to import a session that was made for previous data. This function tries its best to guess the new feature group name based on similarity of their retention times and m/z values.
checkFeatures(fGroups) # do manual inspection
fGroups <- groupFeatures(fList, ...) # re-group with different parameters
importCheckFeaturesSession("checked-features.yml", "checked-features-new.yml", fGroups)
checkFeatures(fGroups, session = "checked-features-new.yml") # inspect new data
Take care to monitor the messages that importCheckFeaturesSession
may output, as it may be possible that some ‘old’ feature groups are not found or are matched by multiple candidates of the new dataset.
Some additional parameters exist to the functions described in this section. As usualy check the reference manual for more details (e.g. ?checkFeatures
).
NOTE Although the GUI tools described here allow you to easily filter out results, it is highly recommended to first prioritize your data to avoid doing a lot of unneeded manual work.