gnanibioinfo / EzMAP

10 stars 5 forks source link

:( I have an issue #1

Open Tatisgua opened 3 years ago

Tatisgua commented 3 years ago

I am trying to run. the "Downstream Analysis", I have my .tre and .biom files but I got the. following warning: ERROR: error in evaluating the argument 'x' in selecting a method for function 'unique': tax_table slot is empty. Can anyone help me?

gnanibioinfo commented 3 years ago

Your biom file is missing observations metadata table(taxonomy table). So please prepare biom file with taxonomy table and sample data and upload.

Tatisgua commented 3 years ago

Your biom file is missing observations metadata table(taxonomy table). So please prepare biom file with taxonomy table and sample data and upload.

Wow thank you for your super quick reply. One final question, I have my phyloseq object with all my taxa, otus, metadata and phylogenetic info, but my biom only has the taxa and out info. Hence, how should I either create a biom file from my phyloseq object, or add the metadata table to my biom file? :) Thanks!!

gnanibioinfo commented 3 years ago

Once you have your feature table (otu_table.biom) from qiime2 output, using biom one can add metadata and taxonomy table with the following command

biom add-metadata -i otu_table.biom -o table_tax_meta.biom --observation-meta-fp taxonomy_table.txt --sample-metadata-fp sample_data.txt

From phyloseq object to biom format, install biome and metagenomeseq (we will make use of make_biom function from metagenomeseq)

Considering that your phyloseq object is my_ps

library(biome) library(metagenomeSeq)

otu = biom_data(my_ps) sample_info = sample_metadata(my_ps) tax = observation_metadata(my_ps)

biom_object = make_biom(otu, sample_info, tax)