plotSeries.Rd
This function plots series data.
plotSeries(
object,
x,
y = NULL,
rank = NULL,
colour_by = NULL,
size_by = NULL,
linetype_by = NULL,
assay.type = assay_name,
assay_name = "counts",
...
)
# S4 method for SummarizedExperiment
plotSeries(
object,
x,
y = NULL,
rank = NULL,
colour_by = NULL,
size_by = NULL,
linetype_by = NULL,
assay.type = assay_name,
assay_name = "counts",
...
)
a
SummarizedExperiment
object.
a single character value for selecting the column from
ColData
that
will specify values of x-axis.
a single character value for selecting the taxa from
rownames
.
This parameter specifies taxa whose abundances will be plotted.
a single character value defining a taxonomic rank, that is used
to agglomerate the data. Must be a value of taxonomicRanks()
function.
a single character value defining a taxonomic rank, that is used to
color plot. Must be a value of taxonomicRanks()
function.
a single character value defining a taxonomic rank, that is
used to divide taxa to different line size types. Must be a value of
taxonomicRanks()
function.
a single character value defining a taxonomic rank, that
is used to divide taxa to different line types. Must be a value of
taxonomicRanks()
function.
a single character value for selecting the
assay
to be
plotted. (default: assay.type = "counts"
)
a single character
value for specifying which
assay to use for calculation.
(Please use assay.type
instead. At some point assay_name
will be disabled.)
additional parameters for plotting. See
mia-plot-args
for more details i.e. call help("mia-plot-args")
A ggplot2
object
This function creates series plot, where x-axis includes e.g. time points, and y-axis abundances of selected taxa.
if (FALSE) {
library(mia)
# Load data from miaTime package
library("miaTime")
data(SilvermanAGutData)
object <- SilvermanAGutData
# Plots 2 most abundant taxa, which are colored by their family
plotSeries(object,
x = "DAY_ORDER",
y = getTopFeatures(object, 2),
colour_by = "Family")
# Counts relative abundances
object <- transformAssay(object, method = "relabundance")
# Selects taxa
taxa <- c("seq_1", "seq_2", "seq_3", "seq_4", "seq_5")
# Plots relative abundances of phylums
plotSeries(object[taxa,],
x = "DAY_ORDER",
colour_by = "Family",
linetype_by = "Phylum",
assay.type = "relabundance")
# In addition to 'colour_by' and 'linetype_by', 'size_by' can also be used to group taxa.
plotSeries(object,
x = "DAY_ORDER",
y = getTopFeatures(object, 5),
colour_by = "Family",
size_by = "Phylum",
assay.type = "counts")
}