converting .tsv file to .qza artifact and filtering taxa

Hi everyone,

I was recently given a .tsv feature table file, a screenshot of a portion of the file is displayed below:

My goal is to filter taxa with the Eukaryota and Archaea domains using qiime2-2020.11. I first converted the .tsv file to .biom file using the following code:

biom convert -i featuretable.tsv -o featuretable.biom --table-type "Table" --to-hdf5

I then converted the .biom file to .qza artifact:

qiime tools import
--input-path featuretable.biom
--type FeatureTable[Frequency]
--output-path featuretable.qza

I then used the featuretable.qza file as input for my filtering step

qiime taxa filter-table
--i-table featuretable.qza
--i-taxonomy taxonomy.qza
--p-mode contains
--p-exclude "D_0__Eukaryota","D_0__Archaea"
--o-filtered-table filteredtable.qza

When I perform this step, I get the following error: All features ids must be present in taxonomy, but the following ids are not: C4, C18, C22, C42, ...; the error then lists every sample I have in my dataset. When I convert my featuretable.qza to a visualization file, I see that the ASV ids and the sample ids are transposed (please note - the ASVs in this screenshot are in alphabetical order;t the ASVs in the previous screenshot are not):

I tried using qiime feature-table transpose to transpose the artifact. When I re-run my qiime taxa filter-table with the transposed feature table, I get the same error except the ASVs are in-place of the sample IDs.

What am I doing wrong? I've used the same taxonomy file throughout my project and have had no issues with it so far.

Thank you for your help.

-Ryan

Hello!
If you are receiving this error (in second case):

But this time with list of ASVs instead of sample IDs, that's meant that your taxonomy file do not contain ASVs form your new feature table.
As I understood, it is a new file:

So i am wondering, if your taxonomy file was produced based on other dataset:

Did you create a taxonomy file based on ASV sequences that are present in your new dataset, or you created it earlier?

If I am correct, you need to create a new taxonomy artifact using representative sequences with ASVs from your new feature table.

Best,
Timur

1 Like

Hi Timur,

Thanks for your response. The taxonomy file I am using in this project was not created using the new ASV file I received. I think I will need to create a new taxonomy artifact using the new sequences I received. Thanks again!

Ryan

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