Can not remove a specific feature from feature table

Hi,

To remove a specific feature from feature table, I used this code from qiime2 tutorials
qiime taxa filter-table --i-table table.qza --i-taxonomy taxonomy.qza --p-mode exact --p-exclude “Ambiguous_taxa; Ambiguous_taxa; Ambiguous_taxa; Ambiguous_taxa; Ambiguous_taxa; Ambiguous_taxa; Ambiguous_taxa” --o-filtered-table table-no-ambiguous.qza

When I visualized the new table-no-ambiguous.qzv, I still see this ambiguous taxa.
I need to remove it from feature table, rep_seq.qza and taxonomy.qza.
Is there any way to remove by feature ID.

Thank you
Eman

Hi @Eman,
Your command looks good but are you sure the feature you are trying to remove is copied into your command exactly? For example, the filtering tutorial is trying to filter a taxa found from the greengenes database which have double underscores __ instead of one _ that you showed above.

I copied the taxon from the taxonomy table, that is why I did not use D_0__, (taxonomy ranks) as in the tutorial.
Thanks for your reply. I did nor receive any response since morning.

1 Like

Hi @Eman! Please take a few moments to refresh your memory on the Code of Conduct, in particular: Code of Conduct - QIIME 2 Forum

Thanks! :qiime2:

1 Like

Oh! sorry, I am just frustrated when I stuck. Need help!
Thanks

Hi @Eman,
Like everything, patience will come with practice :wink:
Ok, in order to reproduce your situation, could you please provide us with 1) your taxonomy.qza artifact, and 2) the exact commands you are performing via copy&paste. For your own reference, you can copy & paste your commands between a pair of triple backticks ``` to get a block like below for clarity.

qiime taxa filter-table \
  --i-table table.qza \
  --i-taxonomy taxonomy.qza \
  --p-mode exact \
  --p-exclude "k__Bacteria; p__Proteobacteria; c__Alphaproteobacteria; o__Rickettsiales; f__mitochondria" \
  --o-filtered-table table-no-mitochondria-exact.qza

Hi @Eman,
Just realized that you had actually provided the exact command, I didn’t put together that the ...Ambigious_taxa was actually the taxa you were trying to remove, I thought it was just a placeholder. Excuse my inattention and you can ignore my last request.

Looks like in the Silva database this doesn’t exist:

Ambiguous_taxa; Ambiguous_taxa; Ambiguous_taxa; Ambiguous_taxa; Ambiguous_taxa; Ambiguous_taxa; Ambiguous_taxa

Instead, try:

Ambiguous_taxa;Ambiguous_taxa;Ambiguous_taxa;Ambiguous_taxa;Ambiguous_taxa;Ambiguous_taxa;Ambiguous_taxa

Note the removed space after ;

1 Like

I will try it tomorrow as I left the campus. Will keep you updated.
Thank you very much.
Eman

2 Likes

An off-topic reply has been split into a new topic: error loading feature table into R with read_biom

Please keep replies on-topic in the future.

Hello,
I am working on a new set of data using qiime2-2019.4. When run
qiime taxa filter-table --i-table table.qza --i-taxonomy taxonomy.qza --p-mode exact --p-exclude “Ambiguous_taxa; Ambiguous_taxa; Ambiguous_taxa; Ambiguous_taxa; Ambiguous_taxa; Ambiguous_taxa; Ambiguous_taxa” --o-filtered-table table-no-amb-exact.qza

and check qzv file, I still can see ambiguous taxa featureID??
when run the same command but without spaces “Ambiguous_taxa;Ambiguous_taxa;Ambiguous_taxa”
I got an error:
Error: Detected invalid character in: “Ambiguous_taxa
Verify the correct quotes or dashes (ASCII) are being used.
Ambiguous_taxa: command not found

however, in qiime2-2019.1, this command run successfully without spaces as @Mehrbod_Estaki recommended!!
May you please help me to figure it out?
Thanks

1 Like

Hi @Eman,

This first error is just because of the spaces as mentioned previously.
As for the next error, I have on suggestion. Are you by chance copy & pasting your input from another editor like Word? It might be that you are copying a non-ASCII element -as the error suggests- that the terminal is not recognizing. Try writing your full script in terminal or use something like notebook instead. If these don't work could you please copy&paste your full command here within the 3 backticks as mentioned above (this is actually very helpful in all instnaces when requesting support on the forum)

1 Like

Hi @Mehrbod_Estaki,
Yes, I copy and paste from gedit file, however I wrote the command as you mentioned and the taxon is now removed (much thanks!). But usually copy and paste from gedit is working fine, except this time??
By the way, when I write the command as in tutorials (subsequent lines with 3 backticks), the command line starts each enter hit with > and at the end, it does not run the command, just starting new lines with >. That is why I write it as a continuous line :grinning:.

Thanks a lot.

1 Like

An off-topic reply has been split into a new topic: Why is rarefying required with core-metrics but not when ran individually?

Please keep replies on-topic in the future.

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