Error when running "qiime fmt engraftment" command from "q2-fmt"

Hello,
I am trying to run the "qiime fmt engraftment" but I am getting error. The error message is below.

Plugin error from fmt:

add_field() got an unexpected keyword argument 'source'

Debug info has been saved to /tmp/qiime2-q2cli-err-kl_2yept.log

What can I do to fix this? Thank you.

Hi @oluwapaul,

Welcome to the :qiime2: forum!

Can you please provide the following details:

  • What version of QIIME 2 you have installed?
  • What machine you are using, and what method of installation you used for QIIME 2?
  • The full command you ran (copy/paste from your terminal please) with the --verbose flag enabled, along with the entire error traceback.

This will help us to further assist you. Thanks! :lizard:

I am using 2022.8

I am using Mac and I installed QIIME 2 with module load.

This is the full command I ran

qiime fmt engraftment
--i-diversity-measure div-measure.qza
--m-metadata-file md.tsv
--p-compare baseline
--p-time-column week
--p-reference-column InitialDonorSampleID
--p-subject-column SubjectID
--p-where '[SampleType]="stool"'
--p-filter-missing-references
--p-against-group 0
--p-p-val-approx asymptotic
--o-stats stats.qza
--o-raincloud-plot raincloud-plot.qzv

Hi @oluwapaul,

It sounds like you are using QIIME 2 on an HPC cluster, is that correct?

Please re-run your command with the --verbose flag enabled and copy/paste the entire result from your terminal in your response. Thanks!

Traceback (most recent call last):
File "/home/poladele/.conda/envs/cent7/2020.02-py37/q2-fmt-alpha/lib/python3.8/site-packages/q2cli/commands.py", line 352, in call
results = action(**arguments)
File "", line 2, in engraftment
File "/home/poladele/.conda/envs/cent7/2020.02-py37/q2-fmt-alpha/lib/python3.8/site-packages/qiime2/sdk/action.py", line 234, in bound_callable
outputs = self.callable_executor(scope, callable_args,
File "/home/poladele/.conda/envs/cent7/2020.02-py37/q2-fmt-alpha/lib/python3.8/site-packages/qiime2/sdk/action.py", line 475, in callable_executor
outputs = self._callable(scope.ctx, **view_args)
File "/home/poladele/.conda/envs/cent7/2020.02-py37/q2-fmt-alpha/lib/python3.8/site-packages/q2_fmt/_engraftment.py", line 27, in engraftment
time_dist, ref_dist = group_timepoints(diversity_measure, metadata,
File "", line 2, in group_timepoints
File "/home/poladele/.conda/envs/cent7/2020.02-py37/q2-fmt-alpha/lib/python3.8/site-packages/qiime2/sdk/action.py", line 234, in bound_callable
outputs = self.callable_executor(scope, callable_args,
File "/home/poladele/.conda/envs/cent7/2020.02-py37/q2-fmt-alpha/lib/python3.8/site-packages/qiime2/sdk/action.py", line 408, in callable_executor
artifact = qiime2.sdk.Artifact._from_view(
File "/home/poladele/.conda/envs/cent7/2020.02-py37/q2-fmt-alpha/lib/python3.8/site-packages/qiime2/sdk/result.py", line 349, in _from_view
result = transformation(view, validate_level)
File "/home/poladele/.conda/envs/cent7/2020.02-py37/q2-fmt-alpha/lib/python3.8/site-packages/qiime2/core/transform.py", line 70, in transformation
new_view = transformer(view)
File "/home/poladele/.conda/envs/cent7/2020.02-py37/q2-fmt-alpha/lib/python3.8/site-packages/q2_stats/_transformer.py", line 65, in _4
metadata_resource.schema.add_field(source=metadata)
TypeError: add_field() got an unexpected keyword argument 'source'

Plugin error from fmt:

add_field() got an unexpected keyword argument 'source'

See above for debug info.

Hi @oluwapaul,

This error is actually due to a bug that we've since fixed in our latest QIIME 2 release. I'd recommend installing QIIME 2 2023.2 - you shouldn't run into this issue with the newest version of q2-FMT. Cheers :lizard:

Thank you for your help, it finally worked but I still have a couple of questions.

  1. Since this is calculated based of either alpha or beta diversity metrics, does this represent proportion of donor sample that engraft in the recipient?

  2. Can taxa table be used in for the q2-FMT?

Thank you.

Hey @oluwapaul,
So glad to hear that you are using q2-fmt! :qiime2:

Great question! No it doesn't. We are currently working on other methods that will show proportion of the donor features that engrafted in the samples. qiime fmt sample-peds (Proportional Engraftment of Donor Strains) should be what you are looking for. It gives you a percent of donor features found in each sample. It can be visualized using the heatmap plot in q2-fmt or the raincloud plot!

A taxa table can not really be used for the qiime fmt engraftment pipeline since it only takes alpha and beta diversity metrics but it can be used for sample peds. However, I would warn that it becomes harder to track specific microbes from the donor if you are using a taxa-table. Having said that, 16s data only has genus level resolution so tracking specific donor microbes is a challenge no matter what.

:turtle:

2 Likes