joey711 / phyloseq

phyloseq is a set of classes, wrappers, and tools (in R) to make it easier to import, store, and analyze phylogenetic sequencing data; and to reproducibly share that data and analysis with others. See the phyloseq front page:
http://joey711.github.io/phyloseq/
586 stars 186 forks source link

import_biom issue #1775

Open skose82 opened 3 weeks ago

skose82 commented 3 weeks ago

Hi,

I'm having an issue with import_biom. I've converted the main file using kraken-biom and validated the biom file with biom validate_table feature. It is in json format.

Not sure how to sort this out. Any help would be greatly appeciated.

Command

library("phyloseq") biomfile = "tab_jsonGenus.biom" phlan = import_biom(biomfile, parseFunction=parse_taxonomy_greengenes) otu_table(phlan) <- otu_table(round(as((otu_table(phlan)), "matrix")), taxa_are_rows(phlan)) estimate_richness(phlan) plot_richness(phlan)

Error:

Error in h(simpleError(msg, call)) : error in evaluating the argument 'object' in selecting a method for function 'otu_table': 'names' attribute [3] must be the same length as the vector [0]

File: Before kraken-biom transformation

name taxonomy_id taxonomy_lvl 02V2.htstreamhostrmvd.report_domain.txt_num 02V2_frac 02V5.htstreamhostrmvd.report_domain.txt_num 02V5.htstreamhostrmvd.report_domain.txt_frac 02V7.htstreamhostrmvd.report_domain.txt_num 02V7.htstreamhostrmvd.report_domain.txt_frac 06V2.htstreamhostrmvd.report_domain.txt_num 06V2.htstreamhostrmvd.report_domain.txt_frac 06V5.htstreamhostrmvd.report_domain.txt_num 06V5.htstreamhostrmvd.report_domain.txt_frac 06V7.htstreamhostrmvd.report_domain.txt_num 06V7.htstreamhostrmvd.report_domain.txt_frac (cut for readability). Bacteria 2 D 34892650 0.99499 26683374 0.99585 26086940 0.99672 32974008 0.99636 30900816 0.99584 25957610 0.99460 32639713 0.99512 29539984 0.99141 23689780 0.99107 18146497 0.99159 14724258 0.98731 19433090 0.98985 34276122 0.99720 28779988 0.99742 34474753 0.99776 16319447 0.97751 20069084 0.96912 17384010 0.98389 24375422 0.99504 25709980 0.99634 28310076 0.99621 32141299 0.99564 26846806 0.99590 33180325 0.99647 21368783 0.98634 21132127 0.97443 21408352 0.99268 21506547 0.99528 23447645 0.99348 35446407 0.99725 33024866 0.99560 26611524 0.98553 23740933 0.99341 29803648 0.99627 31851654 0.99657 29333955 0.99663 27801894 0.97788 28438992 0.99469 39229590 0.99613 35197972 0.99397 31639319 0.99579 27184740 0.98409 21112132 0.99313 29858377 0.99163 17572505 0.98255 28062398 0.95578 34079488 0.98825 29535859 0.99270 29931909 0.97499 28975063 0.99026 25400022 0.99204 21696593 0.99299 19259207 0.99064 21676126 0.99381 24851729 0.99411 28508514 0.99494 27424362 0.99523 23934029 0.99276 29833682 0.99529 28108425 0.99583 21537600 0.98773 23083540 0.99277 23210223 0.97999 22535556 0.96824 22047623 0.97989 116 1.00000