Error message for Biom Convert


I am having an issue with using conda environment. I am trying to make biom files.
Below are the command lines that I am running.

conda activate qiime2-2022.2
cd projects
cd pilot
cd 0729
biom convert -i taxa_L3.txt -o taxa_L3.biom --table-type="OTU table" --to-json
biom add-metadata -i taxa_L3.biom -o taxa_L3_meta.biom -m metadata.txt --observation-metadata-fp taxonomy_L3.txt

However, I am getting the same error message as shown below. I have found a similar problem from previous post in the forum, but I was not able to solve the problem on my end.

From the previous post, I ran R -e ".libPaths()" and got below result. Can you help me how to solve the problem?


Thank you.

Hi @csung7,

Just letting you know that I re-classified as "Other bioinformatic tools" and re-named it to make the title more clear!


Hi @csung7, You most likely need to pass the --observation-header parameter as it looks like your taxonomy file does not include column headers. This is documented in the biom-format documentation here. I suspect that you may need to adapt your command as follows:

biom add-metadata -i taxa_L3.biom -o taxa_L3_meta.biom -m metadata.txt --observation-metadata-fp taxonomy_L3.txt --observation-header OTUID,taxonomy,confidence

However the specifics will depend on what columns are in the taxonomy_L3.txt file, which in turn depends on how that file was created. If that command doesn't work, take a look at the taxonomy_L3.txt file by running the following command:

head -n 5 taxonomy_L3.txt

You should see the first few lines of that file, and that will allow you to determine which columns are present. You can adapt the value you provide for --observation-header accordingly.

I hope this helps!


Thank you for your response.
Based on your response, I ran commands but still having an issue. Please see below. I also added text files that I am using.

Hi @csung7, It looks like you have only two columns of metadata in your taxonomy_L3.txt file. Try running the following:

biom add-metadata -i taxa_L3.biom -o taxa_L3_meta.biom -m metadata.txt --observation-metadata-fp taxonomy_L3.txt --observation-header OTUID,taxonomy

Thank you for your reply. I have three files: taxa (as "taxa_L3.txt), taxonomic information column data (as "taxonomy_L3.txt" that includes only taxonomic information with two columns), and metadata (e.g., patients' age, race/ethnicity, and clinical information).

I ran the command line that you provided. But, I am still getting the same error message.

Hi @csung7, Can you provide the first few lines of the metadata.txt file? You can do this by pasting the output of running:

head -n 5 metadata.txt


This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.