plotPrevalence | R Documentation |
plotPrevalence
and plotRowPrevalence
visualize prevalence
information.
plotPrevalence(x, ...)
## S4 method for signature 'SummarizedExperiment'
plotPrevalence(
x,
detection = detections,
detections = c(0.01, 0.1, 1, 2, 5, 10, 20),
prevalence = prevalences,
prevalences = seq(0.1, 1, 0.1),
assay.type = assay_name,
assay_name = "counts",
rank = NULL,
BPPARAM = BiocParallel::SerialParam(),
...
)
plotPrevalentAbundance(x, ...)
## S4 method for signature 'SummarizedExperiment'
plotPrevalentAbundance(
x,
rank = NULL,
assay.type = assay_name,
assay_name = "counts",
colour.by = colour_by,
colour_by = NULL,
size.by = size_by,
size_by = NULL,
shape.by = shape_by,
shape_by = NULL,
show.label = label,
label = NULL,
facet.by = facet_by,
facet_by = NULL,
...
)
plotRowPrevalence(x, ...)
## S4 method for signature 'SummarizedExperiment'
plotRowPrevalence(
x,
rank = NULL,
assay.type = assay_name,
assay_name = "counts",
detection = detections,
detections = c(0.01, 0.1, 1, 2, 5, 10, 20),
min.prevalence = min_prevalence,
min_prevalence = 0,
BPPARAM = BiocParallel::SerialParam(),
...
)
plotTaxaPrevalence(x, ...)
## S4 method for signature 'ANY'
plotTaxaPrevalence(x, ...)
plotFeaturePrevalence(x, ...)
## S4 method for signature 'ANY'
plotFeaturePrevalence(x, ...)
x |
a
|
detection |
|
detections |
Deprecated. Use |
prevalence |
|
prevalences |
Deprecated. Use |
assay.type |
|
assay_name |
Deprecated. Use |
rank , ... |
additional arguments
|
BPPARAM |
A
|
colour.by |
|
colour_by |
Deprecated. Use |
size.by |
|
size_by |
Deprecated. Use |
shape.by |
|
shape_by |
Deprecated. Use |
show.label |
|
label |
Deprecated. Use |
facet.by |
|
facet_by |
Deprecated. Use |
min.prevalence |
|
min_prevalence |
Deprecated. Use |
Whereas plotPrevalence
produces a line plot, plotRowPrevalence
returns a heatmap.
Agglomeration on different taxonomic levels is available through the
rank
argument.
To exclude certain taxa, preprocess x
to your liking, for example
with subsetting via getPrevalent
or
agglomerateByPrevalence
.
A ggplot2
object or plotly
object, if more than one
prevalence
was defined.
getPrevalence
,
agglomerateByPrevalence
,
agglomerateByRank
data(GlobalPatterns, package = "mia")
# Apply relative transformation
GlobalPatterns <- transformAssay(GlobalPatterns, method = "relabundance")
# plotting N of prevalence exceeding taxa on the Phylum level
plotPrevalence(GlobalPatterns, rank = "Phylum")
plotPrevalence(GlobalPatterns, rank = "Phylum") + scale_x_log10()
# plotting prevalence per taxa for different detection thresholds as heatmap
plotRowPrevalence(GlobalPatterns, rank = "Phylum")
# by default a continuous scale is used for different detection levels,
# but this can be adjusted
plotRowPrevalence(
GlobalPatterns, rank = "Phylum", assay.type = "relabundance",
detection = c(0, 0.001, 0.01, 0.1, 0.2))
# point layout for plotRowPrevalence can be used to visualize by additional
# information
plotPrevalentAbundance(
GlobalPatterns, rank = "Family", colour.by = "Phylum") +
scale_x_log10()
# When using function plotPrevalentAbundace, it is possible to create facets
# with 'facet.by'.
plotPrevalentAbundance(
GlobalPatterns, rank = "Family",
colour.by = "Phylum", facet.by = "Kingdom") +
scale_x_log10()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.