This question was also asked on stack overflow

I have QIIME2 outputs (feature table, tree, taxonomy, and metadata) that I've imported into R using qiime2R (v. 0.99.6) ‘qza_to_phyloseq’ to create a phyloseq object. My QIIME feature table shows reasonable values for ASV abundance across all samples (n=16; feature table available upon request).

Problem: The otu_table the ASV values for an entire study (NCBI SRA accession PRJNA217520, named AS_Briggs_NGHP_17A in my data) are shown as 0. This is untrue according to QIIME2view outputs and core-metrics-results (generated following the moving pictures tutorial) and a barchart created using the phyloseq object. Additionally, some stats (alpha diversity) are calculated accurately yet other stats (core members of the microbiome) return errors citing the otu_table.

Ideal solution(s): 1) the otu_table from the phyloseq object is accurate, 2) I debug stats issues, and/or 3) all of the above.

Please see the following code and files for reproducibility below:


  taxonomy = "/path/pyro_sg.taxonomy.qza",
  metadata = "/path/pyro_sg.met.short.txt")

#section out otu_table for ease
otu_table <- (otu_table(pyro_physeq))
otu_table #all SRRs are the study "AS_Briggs_NGHP_17A" except for the first two, SRR1539064 and SRR1795474

I am not expecting the majority of these values to be 0's. I can create barcharts with the same phyloseq object, which use the otu_table as the input.

plot_bar(pyro_physeq, fill="Class")

Alternatively, I've tried to section out the study "AS_Briggs_NGHP_17A" to visualize alone, and the barchart is how I'd expect. Similarly, I tried a quick shannon diversity analysis which was also calculated (and returned believable values).

phy_briggs <- subset_samples(pyro_physeq, name == "AS_Briggs_NGHP_17A")
plot_bar(phy_briggs, fill="Class")
div.sh <- data.frame(diversity(otu_ord, index = "shannon"))

HOWEVER, if I extract that otu_table it's all 0's. If I attempt to calculate the core microbiome using 'core_members' (R package microbiome), the 0's for all ASVs return errors.

pseq.core <- core_members(phy_briggs,prevalence = 50/100,detection = 1/100)
# returns 'character(0)', or to see the error:
pseq.core <- core(phy_briggs,prevalence = 50/100,detection = 1/100)
Error in validObject(.Object) : invalid class “otu_table” object: 
 OTU abundance data must have non-zero dimensions.

This also occurs for the full phyloseq object (pyro_physeq). Thoughts?


metadata: https://www.dropbox.com/scl/fi/wloiq8dze3znplmoqytzt/pyro_sg.met.short.txt?rlkey=bfsnrdqt1peh52xc2cqb3tgnd&dl=0

tree: https://www.dropbox.com/scl/fi/oliaj1qb9annxxptlmuix/pyro_sg.r.tree.qza?rlkey=ijmjeyt77tvk63cn1tovbcgfr&dl=0

feature table: https://www.dropbox.com/scl/fi/goav68y9osdhu6zoam2e0/pyro_sg.table.qza?rlkey=vzmbksfcpf1wvfyqy1frozxcs&dl=0

taxonomy: https://www.dropbox.com/scl/fi/3nmg3aobl8ck04uvm827u/pyro_sg.taxonomy.qza?rlkey=ujs4tjtzih5i6rhzj9xl4icri&dl=0

  • 1
    $\begingroup$ Thanks for the detail. Is this a 16S tree? Is the underlying data set 16S metagenomics or whole genome metagenomics? $\endgroup$
    – M__
    Aug 30 at 16:18
  • 1
    $\begingroup$ Hello, it's all 16S rRNA sequencing using primer-tagged pyrosequencing. $\endgroup$
    – Geomicro
    Aug 30 at 16:43
  • 1
    $\begingroup$ I do understand microbial metagenomics in detail. I would just print out the tree and see what is there. ggtree should do that, i.e. for pyro_physeq. Maybe just post the treefile and see if it looks reasonable. I appreciate the detail of the question, but to fully resolve this appears to be a lot of work. $\endgroup$
    – M__
    Aug 30 at 16:59


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.