I need to merge several biom files in one OTU table. Each file looks like this:
# OTU ID
Before I was using qiime with the the command:
merge_otu_tables.py -i input_file1.biom, input_file2.biom, input_file3.biom -o merged_otu_table.biom
Now, I was wondering if in Qiime2 there was a similar command that I could use instead of merge_otu_tables.py, that dosn’t exist anymore
If you have them in qiime artifact format, check out the
qiime feature-table plugin for operations. If not, you’ll need to
thanks for your quick reply.
I have 20 different hdf5 biom files that I need to merge in one file. They are in a folder named Clean_biom, so, I tried to import them with:
qiime tools import
but I got:
There was a problem importing Clean_biom:
** Clean_biom is not a file.**
It seems work with files not with forder, or maybe I need to specify something
I think you need to import them individually.
Yes! It worked. I imported them individually and then merge them with:
qiime feature-table merge
Is there any way to make it easier? I mean…if you have 100 files, instead writing each importing files, is it possible to specify a folder? or make a loop?
You can use the
--i-tables argument as many times as you like. So you can merge 100 tables together with one command like this:
qiime feature-table merge
If you are comfortable working with the python API this is much easier, since you just input a list of tables to this command, so you can easily glob a whole directory to get this done.
In the end, I have found this post, it’s really useful and the ruby script works well.
I have tried
qiime feature-table merge --i-tables *table.qza --o-merged-table merged_table.qza
Got unexpected extra arguments
ls | grep table.qza > tables.list
qiime feature-table merge --i-tables tables.list --o-merged-table merged_table.qza
ValueError: tables.list is not a QIIME archive.
How do we provide MULTIPLE ARTIFACT PATH List?
The only problem is that my final merged file doesn’t have the taxonomy anymore. A taxonomy was present in the original single biom files. Probably because qiime artifact files don’t include taxonomy? Or is there any option that I should include when importing the biom files?
Correct. QIIME 2 keeps feature tables and metadata (e.g., taxonomy) separate at all times — for one, this makes it much clearer what is stored inside. Feature metadata (e.g., taxonomy) is supplied any time it is needed.
The thing to do is import each of those biom tables a second time as a taxonomy artifact:
qiime tools import \
--input-path table.biom \
--output-path taxonomy.qza \
--source-format BIOMV210Format \
Thanks a lot for your help
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.