Hello,
I have a dataset containing genes identified in different reference genomes. So, the reference genomes are in the Rows and the genes are in the columns of the table. The table is coded as binary 0
means the gene is absent and 1
means the gene is present. I made gene accumulation curves, which indicates that the number of genes per genomes is approaching a plateau.
Now, I am trying to plot the rarefaction curves using the R-package vegan
.
The dataset look likes the following:
gene1 gene2 gene3
#genome1 0 1 0
#genome2 1 0 1
#genome3 1 0 1
I used the following codes:
b<-read.csv("data.csv", header = T, check.names = F)
S <- specnumber(b) # observed number of species
(raremax <- min(rowSums(b)))
Srare <- rarefy(b, raremax)
plot(Srare, xlab = "Observed No. of genes", ylab = "Rarefied No. of genes")
abline(0, 1)
rarecurve(b, step = 15, sample = raremax, col = "blue", cex = 0.6)
However, using this code I am not getting any satisfactory output. I just get only one straight line through the diagonal. I have attached the output below.
Can someone please suggest me how can I correct the output?
Thank you.