Greetings! I've been trying to make a diferential graphic with the package microbiota process everything seems ok, but when I wanna do a graphic by time i just kept getting error.
I'm working from phyloseq object converted to mpse one. I think maybe my group by time is the problem here but not sure about it.
samples.out <- rownames(seqtab.nochim) subject <- samples.out sample <- substr(subject,2,3) time<- substr(subject,5,6) samdf <- data.frame(Subject=subject, Gender=sample, Time=time) rownames(samdf) <- samples.out ps <- phyloseq(otu_table(seqtab.nochim, taxa_are_rows=FALSE), sample_data(samdf), tax_table(taxa)) ps <- prune_samples(sample_names(ps), ps) ps
That's how i create the Phyloseq object and everything goes okay until here. I then convert ps with as.mpse
mpse <- ps %>% as.mpse() mp_rrarefy(mpse) mpse<-mp_cal_rarecurve(mpse, .abundance = RareAbundance, chunks = 400) print(mpse, width = 180) p1<-mp_plot_rarecurve(mpse, .rare = RareAbundanceRarecurve, .alpha = Observe)
everything goes ok until here but i try to do one by groups and I keep getting an error
p2<-mp_plot_rarecurve(mpse, .rare = RareAbundanceRarecurve, .alpha = Observe, .group = time) + aes(x= readsNums, y= value) + scale_color_manual(values = c("#00A087FF", "#3C5488FF") ) + scale_fill_manual(values = c("#00A087FF", "#3C5488FF"), guide= "none")
and always get this error an variationes whatever i do
> p2 Error: ! Problem while computing aesthetics. ℹ Error occurred in the 1st layer. Caused by error in `check_aesthetics()`: ! Aesthetics must be either length 1 or the same as the data (4836) ✖ Fix the following mappings: `colour` and `fill`
As for more information i'm working with sequencing data so i have them with IDs i'm trying to comparate day 00 vs day 02
my IDs go as
Position 5,6 is the time so i selected that as you can see earlier. So dunno what could i go do wrong, i got the problem just when i wanna do the graphic by time, it seems the object P2 it's created but can't get a graphic from it and also keep getting similar trying to use another Microbiote Process tools.