0

I have a dataset of OTUs (observations) and plant species. I want to visualize the shared and unique OTUs among the plant species.

Here is the a part of the data

.OTU.ID T..kraussiana R..venulosa T..africanum T..repens I..evansiana Z..capensis V..unguiculata E..cordatum
   <chr>           <dbl>       <dbl>        <dbl>     <dbl>        <dbl>       <dbl>          <dbl>       <dbl>
 1 Glomus           6150         207            0       111         1144         945           9112        8862
 2 Claroi~           638          71          706        55         1415         510          10798         573
 3 Glomus~          9232        1757          269      1335            0           0             87        1210
 4 Glomus~           133           0            0         0            0           0           6764        3415
 5 Glomus           5292           0         1997         0           16         857             66        6562
 6 Glomus~          1596        2675         1167      1800           27         552              0          21
 7 Glomus~           119         179          544       148            0         792          24967        2471
 8 Glomus~         10493           0            0         0          175           0              0         357
 9 Glomus~          4011           0            0         0            0           0              0         477
10 Glomus           2099        1012           15       902            0         726              0          28

1 Answers1

0

vegan::rarecurve does the job.

library(vegan)
rarecurve(dat[-1], sample=min(rowSums(m)), col="#F48024", lwd=2, 
          main="This could be your title", cex=0.8)

enter image description here


Data:

dat <- read.table(header=TRUE, text="
.OTU.ID T..kraussiana R..venulosa T..africanum T..repens I..evansiana Z..capensis V..unguiculata E..cordatum
 1 Glomus           6150         207            0       111         1144         945           9112        8862
 2 Claroi~           638          71          706        55         1415         510          10798         573
 3 Glomus~          9232        1757          269      1335            0           0             87        1210
 4 Glomus~           133           0            0         0            0           0           6764        3415
 5 Glomus           5292           0         1997         0           16         857             66        6562
 6 Glomus~          1596        2675         1167      1800           27         552              0          21
 7 Glomus~           119         179          544       148            0         792          24967        2471
 8 Glomus~         10493           0            0         0          175           0              0         357
 9 Glomus~          4011           0            0         0            0           0              0         477
10 Glomus           2099        1012           15       902            0         726              0          28
")
jay.sf
  • 60,139
  • 8
  • 53
  • 110
  • Thank you. I believe this is a rarefaction curve. Quite helpful. I wanted a way to see which OTU occurs the most among the species and which occurs the least, possibly quantify these as percentages – ngwoke chukwubuikem Dec 21 '20 at 07:11
  • @ngwokechukwubuikem I see. Are you looking for `prop.table(rowSums(dat[-1]))` and then `barplot(prop.table(rowSums(dat[-1])))`? – jay.sf Dec 21 '20 at 07:29