Filter relative frecuency table

Hi there, I would like to filter features from a relative abundance table. The reason is to obtain a core table maintaining the original relative abundance values. If I use “qiime feature-table filter-features-conditionally” I have to indicate the --p-abundance which in my case it is anything > 0.
Any suggestion / work around?
Regards
Carlo

Hi @Carlo77,

I’m not sure I fully understand the problem, but I’ll do my best to answer.

I think filter-features still only takes a FeatureTable[Abundance] semantic type, which might now solve your problem. (Double check the docs, though!); I think this might solve your problem. You could also look at filter-features-conditionally, which
will work on your relative abundance table and lets you set abundance/prevalence thresholds.

Alternatively, I haven’t used the tool and can’t say more than that it exists, but there’s a new plugin in the library, q2-coremicrobiome, whcih might be of use.

Best,
Justine

Dear Justine,

Thank you for your answer. I will try to explain me better. I want to use the core 50% of my relative taxonomic table to build a network.

I had run the qiime feature-table core-features to obtain the list of the taxa that correspond to the core 50% as qiime feature-table core-features requests a FeatureTable[Frequency]. Now I would like to filter the relative taxonomic table with the list of taxa “to keep” in order to obtain the core 50% of the relative abundance table but qiime wants a frequency table and not a relative frequency table.

If I apply the feature-table filter-features on the original table and then I make the relative-frecuency table, the relative values I will find are not “correct” as they represent the relative frequency of the core and not of the whole table.

If I use qiime feature-table filter-features-conditionally, I need to use --p-abundance and --p-prevalence. The --p-prevalence would be 0.5 but I do not know the --p-abundance as I do not know which is the minimum abundance of my relative table.

Maybe I can consider to use a --p-abundance of 0.0001 (very very small), but still, I find it strange that the feature-table filter-features requests FeatureTable[Frequency]. I can also manipulate the semantic type (which works) but I am asking my self if there is a good reason to avoid filtering features from a relative abundance table.

Best regards
Carlo

Hi @Carlo77,

I’m going to suggest filter-features-conditionally again. It does require a non-zero value for your “abundance” (some small proportion) but will let you filter to 50% of samples pretty easily. (I’d actually recommend some kind additional threshhold, both because it controls your feature space but also because it limits noise from index swapping, well-to-well contamination, etc). It will take your relative frequency table and return an unnormalized table.

@llenzi suggested that if you have a list of organisms you’re interested in, you could also use taxa filter-table

Best,
Justine

Hi guys,

Thank you for your suggestions. The taxa filter table requires FeatureTable[Frequency] thus I cannot use it for my relative table.

On the other hand, using a minimum abundance value makes a lot of sense. (Your reply and sleeping has made me understand the usefulness of controlling the abundance and not just prevalence)

Thank you again, bye.

Carlo

1 Like

Hi @Carlo77,

I’m glad! Good luck with your analysis.

Best,
Justine

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