Using q2-boots as upstream input for q2-fmt

Dear qiime2 forum,

I am planning to use the q2-fmt plugin on my data, but I would like to combine it with q2-boots so I can perform Rarefaction if possible.

My thought was that I could take the inputs from q2-boots and sub them into q2-fmt, and that I could create an "average feature table" from the multiple feature tables created through rarefaction in q2-boots by using q2-feature-table merge by using the average as the overlap method.

However, as I recognize the tool was not designed for this I am concerned that there are plugin features within it that would not be compatible, or even worse that using the q2-boots outputs instead could jeopardize the outputs of q2-fmt. As such, I would greatly appreciate your input on:

a) the feasibility of this (would this be possible, is this not recommended?) and
b) if there is a better way of combining the two than I have outlined below:

Specifically, I would like to use the following plugin features:

  1. Distance to Baseline / Donor - input seems to be a diversity metric

    • Would it be possible to simply input a diversity metric generated from q2 boots instead?
  2. Proportional Engraftment of Donor Features (PEDF) - input is rarefied feature table

    • Would it be possible to input the merged "average rarefaction feature table" instead?
  3. Permutation Test of PEDF - input is rarefied table but also requires information on sampling depth

    • Would it be possible to input the merged "average rarefaction feature table" instead?
    • Out of curiosity, why is sampling depth information used for in this function?
  4. Feature Engraftment input is taxonomy collapsed, relative frequency feature table

    • What is the advantage of using relative frequency feature table rather than a Rarefaction corrected feature table? For consistency, would it be possible to use the "average rarefaction feature table" instead?

Thank you so much in advance for your help!! :folded_hands:

kindest regards,
Zoë

p.s. upon thinking about this more, I wonder if the best way for PEDF would be to create it like how q2-boots does -- by calculating a value for each of the eg. 100 subsampled tables, and then making an average from that. Would there be any way that this would be possible? Thank you so much!!

1 Like

Hi @zippyzo,
Thanks for using q2-fmt!

It is possible to used averaged diversity metrics from q2-boots in q2-fmt. For distance-to-baseline/donor q2-fmt is filtering and ploting that information, not calculating new diversity metrics so averaged outputs from boots will work perfectly.

For PEDF, you could import and averaged rarefied feature table, but it run rarefaction within the method by passing in a sampling depth and a num-resamples. This gives PEDF more information then passing in an already averaged table.

This function has a required samling depth because its statically comparing values (as opposed to PEDF which is just visually inspecting). The permutation test performs rarefaction within the method and I would suggest using those on a non-rarefied table to give the method as robust information as possible. Averaging collapses some of the robust information that boots gives you done, so the permutation test input should be a non-rarefied table ideally.

There is no advantage to using a relative-freq vs rarefaction based table here.

In short, q2-fmt is completely compatible with boots and some of q2-fmts methods like PEDF and PEDF-permutation test take inspiration from the rarefaction based methods of boots and apply them.

I hope that helps!

3 Likes

Hello @cherman2,
Thank you so much for taking the time to reply to all my questions!! I really appreciate it.

This is all super helpful to know. I had not realized that PEDF q2-fmt was performing rarefaction itself, as I thought it was just a single sampling! Apologies for the confusion!

Thank you,
Zoë

2 Likes

No problem! Thanks for using q2-fmt and let me know if you have any other questions!

1 Like