Skip to content

Neutral.fit function cannot be implemented in sparse OTU table #32

@makerer5

Description

@makerer5

Hello!

otutab.txt

I have an OTU table of the original sparse matrix (most species have an abundance of 0 in the sample, otutab.txt), and use it for neutral model analysis. When using Neutral.fit(otu), the generated freq.pred is 0. In the end, my results are not so satisfactory. Can you help me see where I can improve? Here is my complete code:

otutab <- read.delim("otutab.txt",row.names = 1)
otu_rel <- sweep(otutab, 2, colSums(otutab), FUN = "/")
otu <- t(otu_rel)
res<-neutral.fit(otu)

Note: The otutab.txt file is a raw absolute abundance matrix, which has not been flattened and converted to a relative abundance matrix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions