Various plotting functions for feature group data.
# S4 method for class 'featureGroups,missing'
plot(
x,
colourBy = c("none", "rGroups", "fGroups"),
onlyUnique = FALSE,
retMin = FALSE,
showLegend = TRUE,
col = NULL,
pch = NULL,
...
)
# S4 method for class 'featureGroups'
plotInt(
obj,
average = FALSE,
normalized = FALSE,
xnames = TRUE,
showLegend = FALSE,
pch = 20,
type = "b",
lty = 3,
col = NULL,
plotArgs = NULL,
linesArgs = NULL
)
# S4 method for class 'featureGroupsSet'
plotInt(
obj,
average = FALSE,
normalized = FALSE,
xnames = !sets,
showLegend = sets,
pch = 20,
type = "b",
lty = 3,
col = NULL,
plotArgs = NULL,
linesArgs = NULL,
sets = FALSE
)
# S4 method for class 'featureGroups'
plotChord(
obj,
addSelfLinks = FALSE,
addRetMzPlots = TRUE,
average = FALSE,
outerGroups = NULL,
addIntraOuterGroupLinks = FALSE,
...
)
# S4 method for class 'featureGroups'
plotChroms(
obj,
analysis = analyses(obj),
groupName = names(obj),
retMin = FALSE,
showPeakArea = FALSE,
showFGroupRect = TRUE,
title = NULL,
colourBy = c("none", "rGroups", "fGroups"),
showLegend = TRUE,
annotate = c("none", "ret", "mz"),
intMax = "eic",
EICParams = getDefEICParams(),
showProgress = FALSE,
xlim = NULL,
ylim = NULL,
EICs = NULL,
...
)
# S4 method for class 'featureGroups'
plotVenn(obj, which = NULL, ...)
# S4 method for class 'featureGroupsSet'
plotVenn(obj, which = NULL, ..., sets = FALSE)
# S4 method for class 'featureGroups'
plotUpSet(obj, which = NULL, nsets = length(which), nintersects = NA, ...)
# S4 method for class 'featureGroups'
plotVolcano(
obj,
FCParams,
showLegend = TRUE,
averageFunc = mean,
normalized = FALSE,
col = NULL,
pch = 19,
...
)
# S4 method for class 'featureGroups'
plotGraph(obj, onlyPresent = TRUE, width = NULL, height = NULL)
# S4 method for class 'featureGroupsSet'
plotGraph(obj, onlyPresent = TRUE, set, ...)Sets the automatic colour selection: "none" for a single colour or
"rGroups"/"fGroups" for a distinct colour per replicate/feature group.
If TRUE and colourBy="rGroups" then only
feature groups that are unique to a replicate group are plotted.
Plot retention time in minutes (instead of seconds).
Plot a legend if TRUE.
Colour(s) used. If col=NULL then colours are automatically generated.
Common plotting parameters passed to e.g. plot. For plot:
if pch=NULL then values are automatically assigned.
passed to plot (plot, plotChroms, plotTICs and
plotBPCs), VennDiagram plotting functions (plotVenn), chordDiagram
(plotChord) or upset (plotUpSet).
featureGroups object to be used for plotting.
If TRUE then data within replicate groups are averaged.
For as.data.table: if features=TRUE other feature properties are also averaged.
Plot analysis (or replicate group if average=TRUE) names on the x axis.
A list with further arguments passed to plot and
lines, respectively.
(sets workflow) For plotInt: if TRUE then feature intensities are plot per set (order follows the
analysis information).
For plotVenn: If TRUE then the which argument changes its meaning and is used to specify the
names of the sets to be compared.
If TRUE then 'self-links' are added which
represent non-shared data.
Set to TRUE to enable m/z vs
retention time scatter plots.
Character vector of names to be used as outer groups. The
values in the specified vector should be named by analysis names
(average set to FALSE) or replicate group names
(average set to TRUE), for instance: c(analysis1 =
"group1", analysis2 = "group1", analysis3 = "group2"). Set to NULL
to disable outer groups.
If TRUE then links will be added within
outer groups.
character vector with the analyses/group names to be considered for plotting.
Compared to subsetting the featureGroups object (obj) upfront this is slightly faster and (if
onlyPresent=FALSE) allows plotting chromatograms for feature groups where none of the specified analyses
contain the feature (which is impossible otherwise since subsetting leads to removal of 'empty' feature groups).
Set to TRUE to display integrated chromatographic peak ranges by filling (shading) their
areas.
Set to TRUE to mark the full retention/intensity range of all features within a feature
group by drawing a rectangle around it.
Character string used for title of the plot. If NULL a title will be automatically generated.
If set to "ret" and/or "mz" then retention and/or m/z values will be drawn for
each plotted feature group.
Method used to determine the maximum intensity plot limit. Should be "eic" (from EIC data) or
"feature" (from feature data). Ignored if the ylim parameter is specified.
A named list with parameters used for extracted ion chromatogram (EIC) creation. See the
EIC parameters documentation for more details.
if set to TRUE then a text progressbar will be displayed when all EICs are being plot. Set
to "none" to disable any annotation.
Sets the plot size limits used by
plot. Set to NULL for automatic plot sizing.
Internal parameter for now and should be kept at NULL (default).
A character vector with replicate groups used for comparison. Set to NULL to ignore.
For plotVenn: alternatively a named list containing elements of character vectors with
replicate groups to compare. For instance, which=list(infl = c("influent-A", "influent-B"), effl =
c("effluent-A", "effluent-B")), will compare the features in replicate groups "influent-A/B" against those
in "effluent-A/B". The names of the list are used for labelling in the plot, and will be made automatically
if not specified.
See upset.
A parameter list to calculate Fold change data. See getFCParams for more details.
Used for intensity data treatment, see the documentation for the
as.data.table method.
Only plot feature groups of internal standards that are still present in the featureGroups
input object (which may be otherwise be removed by e.g. subsetting or
filter).
Passed to visNetwork.
(sets workflow) The set for which data must be plotted.
plotVenn (invisibly) returns a list with the following fields:
gList the gList object that was returned by
the utilized VennDiagram plotting function.
areas The total area for each plotted group.
intersectionCounts The number of intersections between groups.
The order for the areas and intersectionCounts fields is the same as the parameter order
from the used plotting function (see e.g. draw.pairwise.venn and
draw.triple.venn).
plotGraph returns the result of visNetwork.
plot Generates an m/z vs retention time
plot for all featue groups. Optionally highlights unique/overlapping
presence amongst replicate groups.
plotInt Generates a line plot for the (averaged) intensity of feature groups within all analyses
plotChord Generates a chord diagram which can be used to
visualize shared presence of feature groups between analyses or replicate
groups. In addition, analyses/replicates sharing similar properties
(e.g. location, age, type) may be grouped to enhance visualization
between these 'outer groups'.
plotChroms Plots extracted ion chromatograms (EICs) of feature groups.
plotVenn plots a Venn diagram (using VennDiagram) outlining unique and shared feature
groups between up to five replicate groups.
plotUpSet plots an UpSet diagram (using the upset function) outlining unique
and shared feature groups between given replicate groups.
plotVolcano Plots Fold change data in a 'Volcano plot'.
plotGraph generates an interactive network plot which is used to explore internal standard (IS)
assignments to each feature group. This requires the availability of IS assignments, see the documentation for
normInts for details. The graph is rendered with visNetwork.
The following methods are changed or with new functionality:
plotVenn and plotInt allow to handle data per set. See the sets argument description.
plotGraph only plots data per set, and requires the set argument to be set.
Gu Z, Gu L, Eils R, Schlesner M, Brors B (2014). “circlize implements and enhances circular visualization in R.” Bioinformatics, 30, 2811-2812.
Conway JR, Lex A, Gehlenborg N (2017).
“UpSetR: an R package for the visualization of intersecting sets and their properties.”
Bioinformatics, 33(18), 2938-2940.
doi:10.1093/bioinformatics/btx364
, http://dx.doi.org/10.1093/bioinformatics/btx364.
Lex A, Gehlenborg N, Strobelt H, Vuillemot R, Pfister H (2014).
“UpSet: Visualization of Intersecting Sets.”
IEEE Transactions on Visualization and Computer Graphics, 20(12), 1983–1992.
doi:10.1109/tvcg.2014.2346248
.