pcoa_plot: Visulization of components distance / dissimilarity in k...

Description Usage Arguments Value Examples

Description

Visulization of components distance / dissimilarity in k dimension.

Visulization of components distance / dissimilarity in k dimension.

Usage

1
2
3
4
pcoa_plot(x, des, match, ...)

## S4 method for signature 'list,data.frame,character'
pcoa_plot(x, des, match, d1 = 1, d2 = 2, color, shape = NULL, ...)

Arguments

x

A list generated by 'dmr'.

des

The corresponding descriptive table.

match

The column name of the components IDs in 'des' with exactly the same as rownames in x.

...

Additional parameters.

d1

The dimension be visualized in x-axis, default '1'.

d2

The dimension be visualized in y-axis, default '2'.

color

The column name in 'des' to be used for different color groups.

shape

The column name in 'des' to be used for different shape groups, default 'NULL'.

Value

p The plotted figure.

p The plotted PCoA.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
maize <- new("mina", tab = maize_asv2, des = maize_des2)
maize <- norm_tab(maize, method = "raref")
maize <- fit_tabs(maize)
maize <- com_dis(maize, method = "bray")
maize <- dmr(maize)
asv_dmr <- .dmr(maize)
des <- des(maize)
p1a <- pcoa_plot(asv_dmr, des, match = "Sample_ID", color = "Compartment")
p1b <- pcoa_plot(asv_dmr, des, match = "Sample_ID", d1 = 3, d2 = 4, color =
"Compartment")
p2a <- pcoa_plot(asv_dmr, des, match = "Sample_ID", color = "Host_genotype")
p2b <- pcoa_plot(asv_dmr, des, match = "Sample_ID", d1 = 1, d2 = 3, color =
"Host_genotype")
p3a <- pcoa_plot(asv_dmr, des, match = "Sample_ID", color = "Compartment",
shape = "Soil")
p3b <- pcoa_plot(asv_dmr, des, match = "Sample_ID", d1 = 1, d2 = 4, color =
"Compartment", shape = "Soil")
maize <- new("mina", tab = maize_asv2, des = maize_des2)
maize <- norm_tab(maize, method = "raref")
maize <- fit_tabs(maize)
maize <- com_dis(maize, method = "bray")
maize <- dmr(maize)
asv_dmr <- .dmr(maize)
des <- des(maize)
p1a <- pcoa_plot(asv_dmr, des, match = "Sample_ID", color = "Compartment")
p1b <- pcoa_plot(asv_dmr, des, match = "Sample_ID", d1 = 3, d2 = 4, color =
"Compartment")
p2a <- pcoa_plot(asv_dmr, des, match = "Sample_ID", color = "Host_genotype")
p2b <- pcoa_plot(asv_dmr, des, match = "Sample_ID", d1 = 1, d2 = 3, color =
"Host_genotype")
p3a <- pcoa_plot(asv_dmr, des, match = "Sample_ID", color = "Compartment",
shape = "Soil")
p3b <- pcoa_plot(asv_dmr, des, match = "Sample_ID", d1 = 1, d2 = 4, color =
"Compartment", shape = "Soil")

Guan06/mina documentation built on Feb. 21, 2022, 11:56 a.m.