Problems when I filter my feature-table by featureid using qiime feature-table filter-features plugin


I am filtering my feature-table by featureid. I want to keep the featureid included in my tsv file "unmapped_reads" which is a tsv file, with only one column with the featureids in each row (6077 feature ids) and a header (first row) which is 'featureid'.

My orignal table, which I want to filter has 13049 features. In my filtered table I want to have only the 6077 features that I have in my tsv file.

The comands that I have used is below (when I tried to keep my wanted features, 6077 in total):

qiime feature-table filter-features --i-table Table_dada2pyro_Original.qza --m-metadata-file unmapped_reads.tsv --o-filtered-table FilteredTable_dada2pyro.qza

or this other one (when I tried to exclude that features, 6077, keeping 6972 in total):
qiime feature-table filter-features --i-table Table_dada2pyro_Original.qza --m-metadata-file unmapped_reads.tsv --p-exclude-ids --o-filtered-table FilteredTable_dada2pyro.qza

In both cases my filtered table has had 3561 features which is obviously an error. I do not know why this number and why in both cases independantly I am excluding or keeping my wanted features.

Do you know what is happening?

I am running qiime2-2021.4
Should I change my version? I use that one because is the version available in the external server that I am using.

Thank you very much in advance!
Best regards,

Hi @MMC_northS!

To confirm, you're talking about the number of features (770 in the example below), and not the total frequency (153807 in the example below) of all observed features?

Would you be willing to DM me a link to download your table and metadata to investigate this more closely?

Hi thermokarst,

Sorry for dealying in my answer.
Yes, exactly. I am talking about number of features.

Regarding to send you the tables, how could I send them to you in a privet way? This data are unpublished so I prefer do not publish the tabñes in the forum. Is this possible?

Thank you very much in advance.
Best regards,

As a direct message (DM) to me. You can send me a link there (in private) where I can access the data.

Click on my avatar, then "Message" to send a DM.

Screen Shot 2021-12-13 at 11.51.01 AM

(I can't send myself a message, so the example above is what it would look like if I were to send you a DM).

Thanks for sharing your data, @MMC_northS. This action is behaving as expected - the reason you're seeing fewer features than you anticipated is simply because the action is filtering all empty samples/features out, too (because you haven't overridden the default for the --p-filter-empty-samples flag):

  --p-filter-empty-samples / --p-no-filter-empty-samples
                       If true, drop any samples where none of the retained
                       features are present.                   [default: True]

If I disable that parameter I see 6,972, just as expected.

I hope that helps! :qiime2:

Thank you very much @thermokarst for your help! I really appreciate it :slight_smile:
I did not realice that this option was activated by default. Sorry about my slip.
Thank you again!

Best regards!

1 Like

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