MicrobiotaProcess
MicrobiotaProcess copied to clipboard
Weird Rarecurve
library(MicrobiotaProcess) library(ggplot2) library(phyloseq) rm(list=ls()) options(stringsAsFactors = F) setwd("C:/Users/lishu/Desktop/ARG/stin/3.1.1/") getwd() otu <- read.delim('稀释.type.txt', row.names = 1, sep = '\t', stringsAsFactors = FALSE, check.names = FALSE) otu1<-as.data.frame(otu) otu1 <- t(otu1) sd <- read.delim('.type.txt', row.names = 1,sep = '\t', stringsAsFactors = FALSE, check.names = FALSE) sd1<-as.data.frame(sd) otu1[is.na(otu1)]<-0 otu1<-ceiling(otu1) sample_data(sd) test_otu_data2<-phyloseq(otu_table(otu1,taxa_are_rows =T), sample_data(sd)) set.seed(1000) p1 <- ggrarecurve(test_otu_data2, indexNames=c("Chao1","ACE"), chunks=10) + guides(color=guide_legend(keywidth=0.5, keyheight=0.5))+ theme(legend.spacing.y=unit(0.02,"cm"), legend.text=element_text(size=6)) p1 and my rarecurve is upside down.
![1658906292668](https://user-images.githubusercontent.com/94595209/181185788-3b3381b1-d33b-414a-8185-e11b78cb4d72.png)