make.shared(biom=) at different taxonomic level

Hi,
I tried to generate a .shared file from a .biom file. With this .shared file, I will use the get.communitytype() command. However, as seen in the publications about enterotypes (including the excellent Ding & Schloss 2014 :wink: ), the “signal” seems to be at the genus level. Therefore I used a .biom file summarized at genus level. Unfortunately, I received this error message:
“[ERROR]: Taxontable is not a valid biom type for mothur. Only type allowed is OTU table.”
So, how can I get around this restriction, without reanalyzing my dataset from scratch with mothur?
In advance, thanks for your help,
Bernard

Can you post part of your biom file?

Thanks for taking care of my request.
Below, you’ll find two extracts (head and tail) of the genus level biom file which did not work.
In advance, thanks for your help.

{“id”: “None”,“format”: “Biological Observation Matrix 1.0.0”,“format_url”: “http://biom-format.org”,“type”: “Taxon table”,“generated_by”: “QIIME 1.8.0”,“date”: “2014-05-16T14:50:22.812552”,“matrix_type”: “sparse”,“matrix_element_type”: “float”,“shape”: [40, 128],“data”: [[0,0,1.0],[0,1,2.0],[0,2,432.0],[0,3,1.0],[0,5,516.0],[0,6,1.0],[0,7,1.0],[0,9,259.0],[0,10,1.0],[0,11,1.0],[0,12,1740.0],[0,13,173.0],[0,14,5.0],[0,15,1.0],[0,16,2.0],[0,18,1.0],[0,19,1.0],[0,20,3.0],[0,21,2776.0],[0,22,345.0],[0,23,1.0],[0,24,1.0],[0,25,1.0],[0,26,1318.0],[0,29,1.0],[0,31,2.0],[0,32,3.0],[0,33,4.0],[0,34,71.0],[0,35,1.0],[0,37,2375.0],[0,39,1.0],[0,40,2.0],[0,41,366.0],[0,42,1.0],[0,44,1528.0],[0,45,54.0],[0,49,2.0],[0,51,7.0],[0,52,1.0],[0,53,1730.0],[0,54,493.0],[0,58,194.0],[0,59,4.0],[0,60,1.0],[0,63,7.0],[0,64,1074.0],[0,65,1.0],[0,66,2.0],[0,70,19.0],[0,71,1.0],[0,72,1759.0],[0,73,3.0],[0,74,1.0],[0,77,2329.0],[0,78,1.0],[0,82,10.0],[0,83,4.0],[0,85,60.0],[0,86,1.0],[0,88,1318.0],[0,90,2.0],[0,91,4.0],[0,92,549.0],[0,95,349.0],[0,96,2497.0],[0,100,1.0],[0,101,2.0],[0,102,1.0],[0,103,3.0],[0,104,736.0],[0,105,317.0],[0,106,1.0],[0,108,2.0],[0,109,778.0],[0,114,3.0],[0,115,2.0],[0,117,270.0],[0,120,2314.0],[0,122,3.0],[0,123,1.0],[0,124,542.0],[0,127,1418.0],[1,0,18.0],[1,1,26.0],[1,2,24.0],[1,3,24.0],[1,4,14.0],[1,5,26.0],[1,6,14.0],[1,7,57.0],[1,8,64.0],[1,9,9.0],[1,10,16.0],[1,11,28.0],[1,12,28.0],[1,13,37.0],[1,14,62.0],[1,15,6.0],[1,16,27.0],[1,17,19.0],[1,18,12.0],[1,19,39.0],[1,20,55.0],[1,21,118.0],[1,22,5.0],[1,23,28.0],[1,24,85.0],[1,25,61.0],[1,26,18.0],[1,27,57.0],[1,28,119.0],[1,29,44.0],[1,30,17.0],[1,31,45.0],[1,32,50.0],[1,33,8.0],[1,34,7.0],[1,35,22.0],[1,36,13.0],[1,37,63.0],[1,38,13.0],[1,39,55.0],[1,40,31.0],[1,41,8.0],[1,42,16.0],[1,43,39.0],[1,44,22.0],[1,45,36.0],[1,46,45.0],[1,47,4.0],[1,48,6.0],[1,49,25.0],[1,50,26.0],[1,51,11.0],[1,52,12.0],[1,53,162.0],[1,54,6.0],[1,55,31.0],[1,56,22.0],[1,57,20.0],[1,58,12.0],[1,59,21.0],[1,60,43.0],[1,61,35.0],[1,62,35.0],[1,63,1.0],[1,64,26.0],[1,65,18.0],[1,66,16.0],[1,67,17.0],[1,68,20.0],[1,69,21.0],[1,70,21.0],[1,71,24.0],[1,72,86.0],[1,73,11.0],[1,74,27.0],[1,75,113.0],[1,76,51.0],[1,77,12.0],[1,78,140.0],[1,79,50.0],[1,80,41.0],[1,81,72.0],[1,82,7.0],[1,83,45.0],[1,84,49.0],[1,85,128.0],[1,86,30.0],[1,87,13.0],[1,88,12.0],[1,89,16.0],[1,90,21.0],[1,91,17.0],[1,92,15.0],[1,93,9.0],[1,94,39.0],[1,95,11.0],[1,96,76.0],[1,97,68.0],[1,98,7.0],[1,99,4.0],[1,100,31.0],[1,101,37.0],[1,102,11.0],[1,103,3.0],[1,104,38.0],[1,105,8.0],[1,106,19.0],[1,107,36.0],[1,108,52.0],[1,109,25.0],[1,110,60.0],[1,111,47.0],[1,112,43.0],[1,113,40.0],[1,114,5.0],[1,115,34.0],[1,116,23.0],[1,117,22.0],[1,118,19.0],[1,119,15.0],[1,120,45.0],[1,121,24.0],[1,122,15.0],[1,123,13.0],[1,124,2.0],[1,125,19.0],[1,126,13.0],[1,127,24.0],[2,0,15301.0],[2,1,3639.0],[2,2,2006.0],[2,3,569.0],[2,4,202.0],[2,5,9401.0],[2,6,5452.0],[2,7,622.0],[2,8,23800.0],[2,9,1891.0],[2,10,7490.0],[2,11,14001.0],[2,12,12431.0],[2,13,10760.0],[2,14,130.0],[2,15,7187.0],[2,16,16919.0],[2,17,116.0],[2,18,22863.0],[2,19,3522.0]

(…)

[39,126,1.0],[39,127,1726.0]],“rows”: [{“id”: “k__Archaea;p__Euryarchaeota;c__Methanobacteria;o__Methanobacteriales;f__Methanobacteriaceae”, “metadata”: null},{“id”: “k__Bacteria;p__Actinobacteria;c__Actinobacteria;o__Actinomycetales;f__Actinomycetaceae”, “metadata”: null},{“id”: “k__Bacteria;p__Actinobacteria;c__Actinobacteria;o__Bifidobacteriales;f__Bifidobacteriaceae”, “metadata”: null},{“id”: “k__Bacteria;p__Bacteroidetes;c__Bacteroidia;o__Bacteroidales;f__Bacteroidaceae”, “metadata”: null},{“id”: “k__Bacteria;p__Bacteroidetes;c__Bacteroidia;o__Bacteroidales;f__Porphyromonadaceae”, “metadata”: null},{“id”: “k__Bacteria;p__Bacteroidetes;c__Bacteroidia;o__Bacteroidales;f__Prevotellaceae”, “metadata”: null},{“id”: “k__Bacteria;p__Bacteroidetes;c__Bacteroidia;o__Bacteroidales;f__Rikenellaceae”, “metadata”: null},{“id”: “k__Bacteria;p__Bacteroidetes;c__Bacteroidia;o__Bacteroidales;f__S24-7”, “metadata”: null},{“id”: “k__Bacteria;p__Bacteroidetes;c__Bacteroidia;o__Bacteroidales;f__[Barnesiellaceae]”, “metadata”: null},{“id”: “k__Bacteria;p__Bacteroidetes;c__Bacteroidia;o__Bacteroidales;f__[Odoribacteraceae]”, “metadata”: null},{“id”: “k__Bacteria;p__Bacteroidetes;c__Bacteroidia;o__Bacteroidales;f__[Paraprevotellaceae]”, “metadata”: null},{“id”: “k__Bacteria;p__Firmicutes;c__Bacilli;o__Lactobacillales;f__Enterococcaceae”, “metadata”: null},{“id”: “k__Bacteria;p__Firmicutes;c__Bacilli;o__Lactobacillales;f__Lactobacillaceae”, “metadata”: null},{“id”: “k__Bacteria;p__Firmicutes;c__Bacilli;o__Lactobacillales;f__Streptococcaceae”, “metadata”: null},{“id”: “k__Bacteria;p__Firmicutes;c__Bacilli;o__Turicibacterales;f__Turicibacteraceae”, “metadata”: null},{“id”: “k__Bacteria;p__Firmicutes;c__Clostridia;Other;Other”, “metadata”: null},{“id”: “k__Bacteria;p__Firmicutes;c__Clostridia;o__;f__”, “metadata”: null},{“id”: “k__Bacteria;p__Firmicutes;c__Clostridia;o__Clostridiales;Other”, “metadata”: null},{“id”: “k__Bacteria;p__Firmicutes;c__Clostridia;o__Clostridiales;f__”, “metadata”: null},{“id”: “k__Bacteria;p__Firmicutes;c__Clostridia;o__Clostridiales;f__Catabacteriaceae”, “metadata”: null},{“id”: “k__Bacteria;p__Firmicutes;c__Clostridia;o__Clostridiales;f__Christensenellaceae”, “metadata”: null},{“id”: “k__Bacteria;p__Firmicutes;c__Clostridia;o__Clostridiales;f__Clostridiaceae”, “metadata”: null},{“id”: “k__Bacteria;p__Firmicutes;c__Clostridia;o__Clostridiales;f__Eubacteriaceae”, “metadata”: null},{“id”: “k__Bacteria;p__Firmicutes;c__Clostridia;o__Clostridiales;f__Lachnospiraceae”, “metadata”: null},{“id”: “k__Bacteria;p__Firmicutes;c__Clostridia;o__Clostridiales;f__Peptococcaceae”, “metadata”: null},{“id”: “k__Bacteria;p__Firmicutes;c__Clostridia;o__Clostridiales;f__Peptostreptococcaceae”, “metadata”: null},{“id”: “k__Bacteria;p__Firmicutes;c__Clostridia;o__Clostridiales;f__Ruminococcaceae”, “metadata”: null},{“id”: “k__Bacteria;p__Firmicutes;c__Clostridia;o__Clostridiales;f__Veillonellaceae”, “metadata”: null},{“id”: “k__Bacteria;p__Firmicutes;c__Clostridia;o__Coriobacteriales;f__”, “metadata”: null},{“id”: “k__Bacteria;p__Firmicutes;c__Clostridia;o__Coriobacteriales;f__Coriobacteriaceae”, “metadata”: null},{“id”: “k__Bacteria;p__Firmicutes;c__Erysipelotrichi;o__Erysipelotrichales;f__Erysipelotrichaceae”, “metadata”: null},{“id”: “k__Bacteria;p__Firmicutes;c__Erysipelotrichi;o__Erysipelotrichales;f__[Coprobacillaceae]”, “metadata”: null},{“id”: “k__Bacteria;p__Fusobacteria;c__Fusobacteria;o__Fusobacteriales;f__Fusobacteriaceae”, “metadata”: null},{“id”: “k__Bacteria;p__Proteobacteria;c__Betaproteobacteria;o__Burkholderiales;f__Alcaligenaceae”, “metadata”: null},{“id”: “k__Bacteria;p__Proteobacteria;c__Deltaproteobacteria;o__Desulfovibrionales;f__Desulfovibrionaceae”, “metadata”: null},{“id”: “k__Bacteria;p__Proteobacteria;c__Gammaproteobacteria;o__Aeromonadales;f__Succinivibrionaceae”, “metadata”: null},{“id”: “k__Bacteria;p__Proteobacteria;c__Gammaproteobacteria;o__Enterobacteriales;f__Enterobacteriaceae”, “metadata”: null},{“id”: “k__Bacteria;p__Proteobacteria;c__Gammaproteobacteria;o__Pasteurellales;f__Pasteurellaceae”, “metadata”: null},{“id”: “k__Bacteria;p__Tenericutes;c__Mollicutes;o__RF39;f__”, “metadata”: null},{“id”: “k__Bacteria;p__Verrucomicrobia;c__Verrucomicrobiae;o__Verrucomicrobiales;f__Verrucomicrobiaceae”, “metadata”: null}],“columns”: [{“id”: “0110.L.BL”, “metadata”: null},{“id”: “0410.L.BL”, “metadata”: null},{“id”: “0610.L.BL”, “metadata”: null},{“id”: “1810.L.BL”, “metadata”: null},{“id”: “5111.L.BL”, “metadata”: null},{“id”: “7811.L.BL”, “metadata”: null},{“id”: “8611.L.BL”, “metadata”: null},{“id”: “9212.L.BL”, “metadata”: null},{“id”: “9312.L.BL”, “metadata”: null},{“id”: “11112.L.BL”, “metadata”: null},{“id”: “11212.L.BL”, “metadata”: null},{“id”: “11612.L.BL”, “metadata”: null},{“id”: “12512.L.BL”, “metadata”: null},{“id”: “1010.R.BL”, “metadata”: null},{“id”: “1210.R.BL”, “metadata”: null},{“id”: “2110.R.BL”, “metadata”: null},{“id”: “3011.R.BL”, “metadata”: null},{“id”: “3411.R.BL”, “metadata”: null},{“id”: “4711.R.BL”, “metadata”: null},{“id”: “5211.R.BL”, “metadata”: null},{“id”: “6011.R.BL”, “metadata”: null},{“id”: “6311.R.BL”, “metadata”: null},{“id”: “7311.R.BL”, “metadata”: null},{“id”: “8811.R.BL”, “metadata”: null},{“id”: “8911.R.BL”, “metadata”: null},{“id”: “9112.R.BL”, “metadata”: null},{“id”: “9412.R.BL”, “metadata”: null},{“id”: “9512.R.BL”, “metadata”: null},{“id”: “10912.R.BL”, “metadata”: null},{“id”: “11712.R.BL”, “metadata”: null},{“id”: “12012.R.BL”, “metadata”: null},{“id”: “12712.R.BL”, “metadata”: null},{“id”: “0110.L.W8”, “metadata”: null},{“id”: “0410.L.W8”, “metadata”: null},{“id”: “0610.L.W8”, “metadata”: null},{“id”: “1810.L.W8”, “metadata”: null},{“id”: “5111.L.W8”, “metadata”: null},{“id”: “7811.L.W8”, “metadata”: null},{“id”: “8611.L.W8”, “metadata”: null},{“id”: “9212.L.W8”, “metadata”: null},{“id”: “9312.L.W8”, “metadata”: null},{“id”: “11112.L.W8”, “metadata”: null},{“id”: “11212.L.W8”, “metadata”: null},{“id”: “11612.L.W8”, “metadata”: null},{“id”: “12512.L.W8”, “metadata”: null},{“id”: “1010.R.W8”, “metadata”: null},{“id”: “1210.R.W8”, “metadata”: null},{“id”: “2110.R.W8”, “metadata”: null},{“id”: “3011.R.W8”, “metadata”: null},{“id”: “3411.R.W8”, “metadata”: null},{“id”: “4711.R.W8”, “metadata”: null},{“id”: “5211.R.W8”, “metadata”: null},{“id”: “6011.R.W8”, “metadata”: null},{“id”: “6311.R.W8”, “metadata”: null},{“id”: “7311.R.W8”, “metadata”: null},{“id”: “8811.R.W8”, “metadata”: null},{“id”: “8911.R.W8”, “metadata”: null},{“id”: “9112.R.W8”, “metadata”: null},{“id”: “9412.R.W8”, “metadata”: null},{“id”: “9512.R.W8”, “metadata”: null},{“id”: “10912.R.W8”, “metadata”: null},{“id”: “11712.R.W8”, “metadata”: null},{“id”: “12012.R.W8”, “metadata”: null},{“id”: “12712.R.W8”, “metadata”: null},{“id”: “1010.L.BL”, “metadata”: null},{“id”: “1210.L.BL”, “metadata”: null},{“id”: “2110.L.BL”, “metadata”: null},{“id”: “3011.L.BL”, “metadata”: null},{“id”: “3411.L.BL”, “metadata”: null},{“id”: “4711.L.BL”, “metadata”: null},{“id”: “5211.L.BL”, “metadata”: null},{“id”: “6011.L.BL”, “metadata”: null},{“id”: “6311.L.BL”, “metadata”: null},{“id”: “7311.L.BL”, “metadata”: null},{“id”: “8811.L.BL”, “metadata”: null},{“id”: “8911.L.BL”, “metadata”: null},{“id”: “9112.L.BL”, “metadata”: null},{“id”: “9412.L.BL.LG.132”, “metadata”: null},{“id”: “9512.L.BL”, “metadata”: null},{“id”: “10912.L.BL”, “metadata”: null},{“id”: “11712.L.BL”, “metadata”: null},{“id”: “12012.L.BL”, “metadata”: null},{“id”: “12712.L.BL”, “metadata”: null},{“id”: “0110.R.BL”, “metadata”: null},{“id”: “0410.R.BL”, “metadata”: null},{“id”: “0610.R.BL”, “metadata”: null},{“id”: “1810.R.BL”, “metadata”: null},{“id”: “5111.R.BL”, “metadata”: null},{“id”: “7811.R.BL”, “metadata”: null},{“id”: “8611.R.BL”, “metadata”: null},{“id”: “9212.R.BL”, “metadata”: null},{“id”: “9312.R.BL”, “metadata”: null},{“id”: “11112.R.BL”, “metadata”: null},{“id”: “11212.R.BL”, “metadata”: null},{“id”: “11612.R.BL”, “metadata”: null},{“id”: “12512.R.BL”, “metadata”: null},{“id”: “1010.L.W8”, “metadata”: null},{“id”: “1210.L.W8”, “metadata”: null},{“id”: “2110.L.W8”, “metadata”: null},{“id”: “3011.L.W8”, “metadata”: null},{“id”: “3411.L.W8”, “metadata”: null},{“id”: “4711.L.W8”, “metadata”: null},{“id”: “5211.L.W8”, “metadata”: null},{“id”: “6011.L.W8”, “metadata”: null},{“id”: “6311.L.W8”, “metadata”: null},{“id”: “7311.L.W8”, “metadata”: null},{“id”: “8811.L.W8”, “metadata”: null},{“id”: “8911.L.W8”, “metadata”: null},{“id”: “9112.L.W8”, “metadata”: null},{“id”: “9412.L.W8”, “metadata”: null},{“id”: “9512.L.W8”, “metadata”: null},{“id”: “10912.L.W8”, “metadata”: null},{“id”: “11712.L.W8”, “metadata”: null},{“id”: “12012.L.W8”, “metadata”: null},{“id”: “12712.L.W8”, “metadata”: null},{“id”: “0110.R.W8”, “metadata”: null},{“id”: “0410.R.W8”, “metadata”: null},{“id”: “0610.R.W8”, “metadata”: null},{“id”: “1810.R.W8”, “metadata”: null},{“id”: “5111.R.W8”, “metadata”: null},{“id”: “7811.R.W8”, “metadata”: null},{“id”: “8611.R.W8”, “metadata”: null},{“id”: “9212.R.W8”, “metadata”: null},{“id”: “9312.R.W8”, “metadata”: null},{“id”: “11112.R.W8”, “metadata”: null},{“id”: “11212.R.W8”, “metadata”: null},{“id”: “11612.R.W8”, “metadata”: null},{“id”: “12512.R.W8”, “metadata”: null}]}

I just realized that this biom file is at the family level. Anyway, it does not work neither, with the same error message.

I found a palliative solution.
I took the biom file, made a txt file with
biom convert -i otu_table.biom -o otu_table_from_biom_w_taxonomy.txt -b --header-key taxonomy --output-metadata-id taxonomy
then I edited the txt file by moving the first colomn (taxon) to the last position, and renamed it taxonomy
then I added a first column with incremental numbers (1,2,3,…) and named it #OTU ID
I then saved the file with a new name : otu_table_from_biom_w_genus_taxonomy.txt
finally I converted the txt file back to biom format with
biom convert -i otu_table_from_biom_w_genus_taxonomy.txt -o otu_table_genus.biom --process-obs-metadata taxonomy --table-type=“otu table”
and then I used
make.shared(biom=otu_table_genus.biom)
which generated the expected shared file and sent me a very kind “dummy” message ( :shock: thanks Pat!)

I was wondering if the default behaviour of make.shared(biom=) could be adapted to handle the original biom files at different taxonomy levels. That would be great, much more simple than what I did.
Or maybe there is another less complicated solution?
In advance, thanks for your help
Bernard

Hi Bernard,
Could you send your complete biom file in “taxon table” format and the edited one you made to work with mothur to mothur.bugs@gmail.com? I would like to make some modifications to mothur’s make.shared command so that mothur can make a shared file directly from the taxon table.
Thanks,
Sarah

Hi Sarah,
thanks for the future modification of the command.
I’ll send the two files
In the meantime, I wrote a small R script which makes the job on the txt file, before converting it back to biom as described above

table=read.table(“table_L5.txt”, header=TRUE, check.names=F)
head(table)
table[“taxonomy”]<-table[1]
colnames(table)[1]<-"# OTU ID"
table[1]<-c(1:nrow(table))
head(table)
file.remove(“table_L5.txt”)
write.table(table, file=“table_L5.txt”, quote=F, sep="\t", row.names=F)

Kindest regards,
Bernard

Thanks for sending your files. The fix will be included in our next release.