堆叠柱状图Stackplot
SampleID | Group |
KO1 | KO |
KO2 | KO |
KO3 | KO |
KO4 | KO |
KO5 | KO |
KO6 | KO |
metadata
Phylum | KO1 | KO2 | KO3 | KO4 | KO5 | KO6 | OE1 | OE2 | OE3 | OE4 | OE5 | OE6 | WT1 | WT2 | WT3 | WT4 | WT5 | WT6 | All |
Proteobacteria | 65.9 | 51.6 | 62.4 | 63 | 74.8 | 70 | 57.5 | 48.2 | 51 | 56.9 | 59.5 | 57.3 | 51.6 | 61.2 | 57.4 | 56.7 | 57 | 57.8 | 53.9 |
Actinobacteria | 26.5 | 40.3 | 27.7 | 28.7 | 17.4 | 24.3 | 29.5 | 36 | 34.2 | 29.1 | 31 | 29.7 | 36.1 | 30 | 32.5 | 34.5 | 34.8 | 32 | 28.5 |
Bacteroidetes | 3.03 | 2.67 | 7.29 | 3.05 | 4.75 | 2.12 | 3.62 | 8.07 | 8.71 | 7.4 | 3.72 | 3.53 | 5.36 | 6.03 | 4.7 | 4.11 | 4.83 | 5.75 | 5 |
Firmicutes | 1.74 | 1.96 | 1.22 | 3.23 | 0.73 | 1.52 | 5.19 | 2.81 | 2.56 | 3.37 | 1.79 | 5.2 | 0.82 | 0.62 | 1.22 | 1.02 | 0.53 | 1.11 | 3.9 |
Chloroflexi | 1.85 | 2.43 | 0.63 | 1.38 | 1.56 | 1.2 | 1.64 | 3.03 | 1.7 | 1.88 | 2.12 | 1.93 | 4.76 | 0.99 | 1.87 | 2.04 | 2.01 | 2.1 | 3.7 |
Acidobacteria | 0.3 | 0.34 | 0.19 | 0.13 | 0.22 | 0.27 | 0.95 | 0.41 | 0.55 | 0.27 | 0.72 | 0.84 | 0.33 | 0.34 | 0.92 | 0.46 | 0.13 | 0.33 | 1.4 |
sum_p
suppressWarnings(suppressMessages(library(amplicon)))
suppressMessages(library(tidyverse))
library(RColorBrewer)
metadata = read.table("https://gitee.com/bioinfoFungi/amplicon/raw/master/data/metadata.txt", header=T, row.names=1, sep="\t", comment.char="", stringsAsFactors = F)
taxonomy = read.table("https://gitee.com/bioinfoFungi/amplicon/raw/master/results/tax/sum_p.txt", header=T, row.names=1, sep="\t", comment.char="", quote = "")
p = tax_stackplot(taxonomy, metadata, topN = 7, groupID = "Group", style = "group", sorted = "abundance")
p + scale_fill_brewer(palette = "Paired")
弦/圈图circlize
suppressWarnings(suppressMessages(library(amplicon)))
metadata = read.table("https://gitee.com/bioinfoFungi/amplicon/raw/master/data/metadata.txt", header=T, row.names=1, sep="\t", comment.char="", stringsAsFactors = F)
taxonomy = read.table("https://gitee.com/bioinfoFungi/amplicon/raw/master/results/tax/sum_p.txt", header=T, row.names=1, sep="\t", comment.char="", quote = "")
tax_circlize(taxonomy, metadata, topN = 4, groupID = "Group")
树图treemap