vmaffei / dada2_to_picrust

Experimental pipeline to perform de novo PICRUSt on de-noised amplicon sequence variants (ASV)
19 stars 1 forks source link

error on line "biom_object <- biomformat::make_biom(data = seqtab_biom)" #11

Closed jjmmii closed 6 years ago

jjmmii commented 6 years ago

Hello,

Firstly, thanks a lot for sharing this method to plug DADA2 ASVs into PICRUSt! I got stuck on Part 1 on the line

>biom_object <- biomformat::make_biom(data = seqtab_biom)
Error in mapply(list, id = as.list(colnames(data)), metadata = NA, SIMPLIFY = FALSE) :
  zero-length inputs cannot be mixed with those of non-zero length

May you share an example of what your seqtab_biom looks like just before this line? Mine looks like this:

> head(seqtab_biom)
         [,1] [,2]
study_1 40307    8
study_2 20420    0
study_3  7295    0
study_4  6969    0
study_5  6878    0
study_6     0 6665

but I'm not sure if it is correct. Is your input file seqtab.nochim.robj saved after performing removeBimeraDenovo? This was my exact command before I saved it:

seqtab <- removeBimeraDenovo(seqtab, method=chimeraMethod, minFoldParentOverAbundance=minParentFold, multithread=multithread)
seqtab.nochim = seqtab
save(seqtab.nochim, file="seqtab.nochim.robj")

Thank you very much. By the way your repo is linked on the QIIME2 forum: https://forum.qiime2.org/t/picrust-support/1376/23

-Jamie

vmaffei commented 6 years ago

Hi, jjimmi! Thanks for posting the snippets. This error arises when column names are missing in the seqtab_biom object. Double check that your column names in that object (which should be your sample names) aren't disappearing somewhere.

Likewise, check that the rownames in the seqtab.nochim object are your sample names (column names should be your unique ASV sequences). This object is transposed prior to biom creation, which is why seqtab_biom and seqtab.nochim are swapped row for column.

jjmmii commented 6 years ago

Hi vmaffei,

Thank you, I re-ran my dada2 using the tutorial commands and it worked. I previously was using QIIME2's internal Rscript and modifying it to save the seqtab.nochim, but apparently that script didn't assign sample names as row names in seqtab.nochim.

vmaffei commented 6 years ago

Ah gotcha! Glad you got it working. Feel free to post again if you run into any issues.