I've been attempting to remove several unwanted taxa from an OTU table using the filter_taxa_from_otu_table.py script, but passing the script doesn't seem to have any effect on my resulting OTU table. This is what I'm attempting to do:
filter_taxa_from_otu_table.py -i otu_table_mc2_w_tax_no_pynast_failures.biom -o otu_table_Metazoa_Syndiniales_filtered.biom -n __Metazoa,__Syndiniales
I've also tried all sorts of other variations of syntax with the -n flag, including
and a bunch of similar variations, with no success
Looking at a number of other threads on similar topics, I also tried the workaround of converting the biom table to tab-separated format, using grep -vE to remove my unwanted taxa, and converting the tab-separated text file back to biom format. When I do this, however, I receive the following error upon trying to work with the OTU table further:
Command returned exit status: 1
Traceback (most recent call last):
File "/usr/local/bin/summarize_taxa.py", line 261, in <module>
File "/usr/local/bin/summarize_taxa.py", line 237, in main
File "/usr/local/lib/python2.7/dist-packages/qiime/summarize_taxa.py", line 43, in make_summary
File "/usr/local/lib/python2.7/dist-packages/qiime/summarize_taxa.py", line 79, in sum_counts_by_consensus
raise ValueError("BIOM table does not contain any "
ValueError: BIOM table does not contain any observation metadata (e.g., taxonomy). You can add metadata to it using the 'biom add-metadata' command.
This is quite confusing to me, as my biom table obviously contained taxonomy prior to converting it to tab-separated text format, and I have no idea how this information was lost.
Does anyone have a solution for fixing either approach or a suggestion for how I can accomplish this another way? Many thanks!
Here are the other threads that I mentioned: