-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRarefaccion_en_R
30 lines (24 loc) · 1.03 KB
/
Rarefaccion_en_R
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
library("ggplot2")
library("tidyverse")
library(ggsci)
setwd("/home/mario/")
rarefy <- read_tsv(file="stability.trim.contigs.good.unique.good.filter.unique.precluster.denovo.vsearch.pick.pick.ASV.groups.rarefaction") %>%
select(-contains("lci-"), -contains("hci-")) %>%
pivot_longer(cols=c(-numsampled), names_to='sample', values_to='sobs') %>%
mutate(sample=str_replace_all(sample, pattern="0.03-", replacement="")) %>%
drop_na()
legend_title <- "Samples"
curva_rare <- ggplot(rarefy,
aes(x=numsampled,
y=sobs,
group=sample,
color=sample))+
geom_line()+
xlab("Sampled")+
ylab("Observed")+
ggtitle("Rarefaction curve water column Isabel Island lake")+
scale_fill_manual(legend_title) +
scale_color_tron()
curva_rare
ggsave("rarefaction.png", path = ".", width = 10, height = 10, device = "png", dpi = 800)
ggsave("rarefaction.pdf", path = ".", width = 10, height = 10, device = "pdf", dpi = 800)