phyloseq_filter_prevalence, non zero dimension
1
0
Entering edit mode
21 months ago

I'm using the function phyloseq_filter_prevalence to filter a phyloseq data. I got an error OTU abundance data must have non-zero dimensions...

df<-phyloseq_filter_prevalence(physeq = myphylo, prev.trh = 0.3, abund.trh = NULL) Error in validObject(.Object) : “otu_table” object: OTU abundance data must have non-zero dimensions.

Could you please help me with a solution to my problem? Thank you.

phyloseq • 1.2k views
ADD COMMENT
0
Entering edit mode
19 months ago
Yunliang • 0

It also happened to me. Here is an alternative way: prevalence<-rowMeans(phy_object@otu_table>0); phy_object1<-prune_taxa(row.names(phy_object@otu_table[prevalence >= 0.05,]), phy_object) is equal to phy_object1<-phyloseq_filter_prevalence(phy_object, prev.trh = 0.05)

Hope it is helpful

ADD COMMENT

Login before adding your answer.

Traffic: 3559 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6