MicrobiotaProcess icon indicating copy to clipboard operation
MicrobiotaProcess copied to clipboard

Weird Rarecurve

Open MAXINELSX opened this issue 2 years ago • 2 comments

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

MAXINELSX avatar Jul 27 '22 07:07 MAXINELSX