Entering edit mode
4.9 years ago
Bioinfonext
▴
460
I used below code to generate NMDS plot, but I used here raw OTU count as input.
prev.ordNMDS_data1 <- ordinate(data1_prev_norm, "NMDS", "bray") plot_ordination(data1_prev_norm,
ordination = prev.ordNMDS_data1, color="Region") + theme_minimal() + geom_point(size=5)
For NMDS, rank-threshold transformation is recommended as input, but I do not know how to it. I will thankful for your help and time to help me with this.
How to do rank threshold transformation for OTU count?
I tried the below code but it shows error in phyloseq:
Error
> ntaxa(mymensingh_all)
[1] 44481
> abund <- otu_table(mymensingh_all)
> abund_ranks <- t(apply(abund, 1, rank))
> abund_ranks <- abund_ranks - 20000
> abund_ranks[abund_ranks < 1] <- 1
> prev.ordNMDS_rank <- ordinate(abund_ranks, "NMDS", "bray")
Error in ordinate(abund_ranks, "NMDS", "bray") :
Expected a phyloseq object or otu_table object.
For NMDS, rank-threshold transformation is recommended, but I do not know how to it. I will thankful for your help and time to help me with this.
How to do rank threshold transformation for OTU count at a?
Thanks