Querying QIIME's plugins generally, and for making phylogenies specifically

Querying QIIME’s plugins generally, and for making phylogenies specifically

Friends,

Is there a way in QIIME to ask one’s current QIIME deployment how many different ways it has to produce a certain type of artifact? Specifically, I fell down the rabbit-hole of different inputs to qiime diversity commands, and gave myself decision-paralysis over whether to use a Phylogeny[Rooted] qza that was output by qiime phylogeny align-to-tree-mafft-fasttree or by qiime fragment-insertion sepp—and what’s worse, that uncertainty bootstrapped itself on my scientist’s anxiety of “is there another, better way for me to do this?”

So I really have two specific questions. First, given that I installed a very boring standard QIIME 2021.2 into conda and haven’t added any plug-ins, does anyone know how many different ways there are to make a Phylogeny[Rooted] qza? Second, if there’s a quick rundown on the pros/cons balance on mafft-fasttree versus sepp—or any other options I have that I don’t know about—can someone tell me what it is?

Or if my questions are wrongly premised, I’d love more clarity. Thanks.

1 Like

Good questions, @wburgess !
I’m not an expert on tree-building, but this topic should give you a good place to start exploring.

As for querying available methods by input or output, I don’t think anything like that exists at this time. I can imagine tooling like that being a neat addition to the framework, or to specific interfaces, but I’m not sure whether anything like that is on the current roadmap. Searching the library for tools that take a certain input type or produce a certain type of output could be useful. @thermokarst or @ebolyen could probably give you a better sense of the likelihood of something like this being developed, potential technical barriers, etc.

Best,
Chris

2 Likes

Good news, @wburgess! @thermokarst pointed me at a part of the framework I haven't explored before. If you're comfortable with Python, qiime2.sdk.actiongraph.build_graph will build you a NetworkX digraph that links nodes representing QIIME 2 Actions to nodes representing the Semantic Types of their inputs and results. Here's a tiny subset showing only one Action:
image

The fasttree action (center) takes in a FeatureData[AlignedSequence] and spits out a Phylogeny[Unrooted] (sorry for the bad capture - limited time to mess with matplotlib today).

By querying this graph I think it's possible to do what you're aiming at here. I was overdue for some tinkering with NetworkX, so I put together a very messy toy example. I'm sure there are better ways to do this, but I'm reasonably satisfied that these building blocks are useful. get_actions_producing_some_type_with_networkx_and_actiongraph.ipynb (26.3 KB)

I'm not going to have time to build a proper solution right now, but hopefully this will get you started, and with :ant: grit and :honeybee: determination :rainbow: you can make your dreams come true. :unicorn: If you decide to take a shot at this, let us know how it goes. :slight_smile:

6 Likes