dend_anno_dotplot

dend_anno_dotplot(
  anno,
  dend,
  y_group,
  c_group = "none",
  prefix = NULL,
  denom = NULL,
  xlab.size = 2,
  ylab.size = 3,
  panel_width = 0.4,
  panel_pad = 0.1
)

Arguments

dend

Dendrogram object. Needs to be labeled with cluster_label

y_group

base name of variable to be represented on y-axis of dotplot below dendrogram. Annotation variable needs to be represented as \_id, \_label, \_color in anno.

c_group

base name of variables to color the dotplot by. Annotation variables need to be represented as \_id, \_label, \_color in anno.

prefix

prefix that groups cluster_id/_label/_color. Used in case of mapping to multiple taxonomies. Default is NULL.

denom

When calculating fraction of either x- or y-axis variables. Input can be "cluster" or y_group. Default is NULL.

plot_anno

Sample annotations. The first column should be sample_name, and each annotation should have \_id, \_label, and \_color columns. Requires cluster_id which needs to be sequential in order of the dendrogram.

Examples

# First, load the example data
load("data/dend_anno_example/dend.rda")
#> Warning: cannot open compressed file 'data/dend_anno_example/dend.rda', probable reason 'No such file or directory'
#> Error in readChar(con, 5L, useBytes = TRUE): cannot open the connection
load("data/dend_anno_example/anno.df.rda")
#> Warning: cannot open compressed file 'data/dend_anno_example/anno.df.rda', probable reason 'No such file or directory'
#> Error in readChar(con, 5L, useBytes = TRUE): cannot open the connection

# Then, run the function with the loaded data
dend_dotplot <- dend_anno_dotplot(
  plot_anno = anno.df,
  dend = dend,
  y_group = "genotype",
  c_group = "genotype",
  denom = NULL
)
#> Error in dend_anno_dotplot(plot_anno = anno.df, dend = dend, y_group = "genotype",     c_group = "genotype", denom = NULL): unused argument (plot_anno = anno.df)