Comments (12)
I think it should be pretty easy to extend, FeatureTable[Composition]
just needs to be declared as an allowed semantic type on the method registration.
Currently the method only works with FeatureTable[Frequency]
. The filtering methods were originally written with the intention of filtering based on integer counts (i.e. frequencies). If all the filtering operations in that method also make sense for compositional data then 👍 for supporting this table type.
from q2-feature-table.
This is also why we don't have something like FeatureTable[Any]
if a method did not know about a particular variant, then we don't know for sure if that variants expectations are upheld by the method. So our expectation is that when new types come along, some minor annotation maintenance may be needed.
from q2-feature-table.
There isn't an immediate solution, you would have to duplicate the method at the moment.
I think @mortonjt was describing a workaround where you first filter the FeatureTable[Frequency]
using the available filtering methods, and then convert that filtered table into FeatureTable[Composition]
. I'm in favor of using that workaround for now since we should have this solved in a general way within the next couple of releases.
from q2-feature-table.
That makes sense. Since compositional tables are generated from frequency tables, we can perform the filtering beforehand - so there is an immediate solution already in place. Just curious, what is TypeMap
?
from q2-feature-table.
Is it possible to do this currently? The output type in this case would be dependent on the input type (if FeatureTable[Frequency]
is input then FeatureTable[Frequency]
would be the output, but if FeatureTable[Composition]
is input then FeatureTable[Composition]
would be the output), and I thought we couldn't support that at the moment.
from q2-feature-table.
I think you're right -- @ebolyen can you confirm please?
from q2-feature-table.
@gregcaporaso is right, we need TypeMap
to handle this correctly.
from q2-feature-table.
Thanks for confirming! I guess we'll need to wait on typemap support, or have a separate method to specifically filter compositional tables (as a temporary solution). The underlying filtering code can probably be reused since it just operates on biom.Table
objects.
from q2-feature-table.
There isn't an immediate solution, you would have to duplicate the method at the moment. (I'm not even sure what I thought I read, but I'm answering a question that never happened... Sorry!)
TypeMap
is supposed to be a type-solver such that you could say:
T = TypeMap({
FeatureTable[Frequency]: FeatureTable[Frequency],
FeatureTable[Composition]: FeatureTable[Composition]
}) # A shorthand for just plain remapping would be good
plugin.register_function(foo,
inputs: {'bar': T},
outputs: [('foo', T)],
...)
Given we want to handle things like filtering/merging more generically in QIIME 2 with indexes, it's not clear if it is immediately useful, as those operations would become builtins and wouldn't need a TypeMap
from q2-feature-table.
The TypeMap
solution sounds like it could be really nice! Might even be able to resolve the some of the semantic issues withPhylogeny
and hierarchical clustering.
from q2-feature-table.
Just ran into this and agree that will be nice to have.
from q2-feature-table.
Closing this as we don't have a clear plan or goal in mind that warrants adding this as an allowed type to filter features
. If something comes up for this though, feel free to open up a new issue @mortonjt!
from q2-feature-table.
Related Issues (20)
- Allow table grouping across multiple semantic table types
- qiime feature-table rarefy --p-with-replacement: sum(pvals[:-1]) > 1.0 HOT 7
- in versions 2020.11 and later sample frequency tables have a random ",0" as first row
- Update 'master' branch name to 'main' HOT 2
- Empty cells in numeric metadata column causing error with viewing feature-table.qzv
- Update table heading in `feature-table summarize` result HOT 1
- `transpose` should support `FeatureTable[RelativeFrequency]` HOT 1
- add split-feature-table action
- add optional inputs to `tabulate-seqs` HOT 4
- add new outputs to `summarize`
- minor numeric formatting changes in `summarize` and `summarize-plus`
- IMP: helper method in `filter_seqs` should have an underscore prefix
- BUG: improve error message formatting in `feature-table tabulate-seqs`
- rename `subsample` action to `subsample-ids`
- sample ids not displayed in summarized feature table HOT 3
- BIOM import failed, TypeError: No format: BIOMV210Format HOT 3
- Need to add tests for the summarize viz and for vizualizations in general HOT 3
- ENH: Adding new action to normalize FeatureTable[Frequency]
- Table Summary should say "Number of Unique Features" HOT 1
- feature-table split fails if there are samples in the metadata that are not in the feature table
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from q2-feature-table.