qiime2 / q2-taxa

BSD 3-Clause "New" or "Revised" License
3 stars 29 forks source link

Allow filtering on multiple semantic types #144

Open jwdebelius opened 3 years ago

jwdebelius commented 3 years ago

Current Behavior Currently, q2-taxa only allows you to operate on a Frequency feature table semantic type, and you can only perform taxonomic filtering on Sequences.

Proposed Behavior I'd like to be able to collapse relative frequency and compositional tables. (I think it would be harder to manage with presence/absence), filter relative frequency and presence/absent tables, and filter aligned sequences.

gregcaporaso commented 1 year ago

In the comment on this issue, collapse is mentioned, and there is a discussion of that under #104. Let's focus this issue on the filter-table action, which should accept other FeatureTable types as input. PresenceAbsence is one that I need right now, and is an easy one (because all values remain independent). RelativeFrequency (and I think Composition) are harder, because the values in the table would need to be recomputed after features are removed.

To achieve this, we'll need to allow FeatureTable[PresenceAbsence] as an input, and add a TypeMap such that the output FeatureTable subtype matches the input FeatureTable subtype.

cherman2 commented 6 months ago

@hagenjp Just did something like this for q2-taxa so she is going to take a stab at this issue!

Seems like we had two github issues for this on our release board.

hagenjp commented 6 months ago