qiime2 / q2-diversity

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

new action — `shared_features` between each pair of samples #163

Open nbokulich opened 7 years ago

nbokulich commented 7 years ago

Improvement Description calculate number of shared features between each pair of samples in a feature table.

Output similarity matrix of number of shared features per pair? (violates hollow 2d matrix requirement for skbio.DistanceMatrix)?

Would need to define new semantic type: SimilarityMatrix

If we want to go the SimilarityMatrix route: skbio.diversity.beta_diversity accepts lambda expressions and callables as metric, so we can define our own similarity metrics without touching skbio.

Also output lists of features that are shared/not-shared between pairs of samples — so a visualizer might be appropriate. We may be looking at a pipeline here, because having a similarity matrix that can be consumed by other methods (e.g., in q2-longitudinal) would be useful.

ElDeveloper commented 7 years ago

SimilarityMatrix would be, I think, the way to go! And the easiest would be to add 1-JaccardDistance.