Trouble running Gneiss with categorical variable and with tutorial data

Hi,

I’m having a lot of trouble getting Gneiss to run with my own data, and with the tutorial data. Because users are not allowed to update software on the computational cluster ourselves, there is a limit to how frequently we can request updates of software, so I am still working in qiime2-2017.8

The tutorial for Gneiss goes well until the step where I try to run the regression. At that point, I am entering the command:

qiime gneiss ols-regression --p-formula "Subject+Sex+Age+BMI+sCD14ugml+LBPugml+LPSpgml" --i-table balances.qza --i-tree hierarchy.qza --m-metadata-file sample-metadata.tsv --o-visualization regression_summary.qzv

But instead of getting the expected results, I get:

Traceback (most recent call last):
  File "/share/apps/bio/bio/envs/qiime2-2017.8/bin/qiime", line 6, in <module>
    sys.exit(q2cli.__main__.qiime())
  File "/share/apps/bio/bio/envs/qiime2-2017.8/lib/python3.5/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/share/apps/bio/bio/envs/qiime2-2017.8/lib/python3.5/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/share/apps/bio/bio/envs/qiime2-2017.8/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/share/apps/bio/bio/envs/qiime2-2017.8/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/share/apps/bio/bio/envs/qiime2-2017.8/lib/python3.5/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/share/apps/bio/bio/envs/qiime2-2017.8/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/share/apps/bio/bio/envs/qiime2-2017.8/lib/python3.5/site-packages/q2cli/commands.py", line 189, in __call__
    arguments, missing_in, verbose, quiet = self.handle_in_params(kwargs)
  File "/share/apps/bio/bio/envs/qiime2-2017.8/lib/python3.5/site-packages/q2cli/commands.py", line 281, in handle_in_params
    kwargs, fallback=cmd_fallback
  File "/share/apps/bio/bio/envs/qiime2-2017.8/lib/python3.5/site-packages/q2cli/handlers.py", line 302, in get_value
    return qiime2.Artifact.load(path)
  File "/share/apps/bio/bio/envs/qiime2-2017.8/lib/python3.5/site-packages/qiime2/sdk/result.py", line 61, in load
    archiver = archive.Archiver.load(filepath)
  File "/share/apps/bio/bio/envs/qiime2-2017.8/lib/python3.5/site-packages/qiime2/core/archive/archiver.py", line 292, in load
    cls._futuristic_archive_error(filepath, archive)
TypeError: _futuristic_archive_error() takes 2 positional arguments but 3 were given

I’ve also tried running Gneiss with my own data, looking for differences in balances using only one categorical variable with two categories. I’ve tried running the regression using the variable with string names and dummy coded as 0 and 1, but I consistently get the following error message:

Plugin error from gneiss:

  Error evaluating factor: NameError: name 'Extraction' is not defined
  Extraction     ^^^^^^^^^^

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

When I look at the log file, this is what I see:

Traceback (most recent call last):
  File "/share/apps/bio/bio/envs/qiime2-2017.8/lib/python3.5/site-packages/patsy/compat.py", line 11
7, in call_and_wrap_exc
    return f(*args, **kwargs)
  File "/share/apps/bio/bio/envs/qiime2-2017.8/lib/python3.5/site-packages/patsy/eval.py", line 166,
 in eval
    + self._namespaces))
  File "<string>", line 1, in <module>
NameError: name 'Extraction' is not defined

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/share/apps/bio/bio/envs/qiime2-2017.8/lib/python3.5/site-packages/q2cli/commands.py", line
222, in __call__
    results = action(**arguments)
  File "<decorator-gen-197>", line 2, in ols_regression
  File "/share/apps/bio/bio/envs/qiime2-2017.8/lib/python3.5/site-packages/qiime2/sdk/action.py", li
ne 201, in callable_wrapper
    output_types, provenance)
  File "/share/apps/bio/bio/envs/qiime2-2017.8/lib/python3.5/site-packages/qiime2/sdk/action.py", li
ne 392, in _callable_executor_
    ret_val = callable(output_dir=temp_dir, **view_args)
  File "/share/apps/bio/bio/envs/qiime2-2017.8/lib/python3.5/site-packages/q2_gneiss/regression/_regression.py", line 24, in ols_regression
    formula=formula)
  File "/share/apps/bio/bio/envs/qiime2-2017.8/lib/python3.5/site-packages/gneiss-0.4.1-py3.5.egg/gneiss/regression/_ols.py", line 129, in ols
    x = dmatrix(formula, metadata, return_type='dataframe')
  File "/share/apps/bio/bio/envs/qiime2-2017.8/lib/python3.5/site-packages/patsy/highlevel.py", line 291, in dmatrix
    NA_action, return_type)
  File "/share/apps/bio/bio/envs/qiime2-2017.8/lib/python3.5/site-packages/patsy/highlevel.py", line 165, in _do_highlevel_design
    NA_action)
  File "/share/apps/bio/bio/envs/qiime2-2017.8/lib/python3.5/site-packages/patsy/highlevel.py", line 70, in _try_incr_builders
    NA_action)
  File "/share/apps/bio/bio/envs/qiime2-2017.8/lib/python3.5/site-packages/patsy/build.py", line 696, in design_matrix_builders
    NA_action)
  File "/share/apps/bio/bio/envs/qiime2-2017.8/lib/python3.5/site-packages/patsy/build.py", line 443, in _examine_factor_types
    value = factor.eval(factor_states[factor], data)
  File "/share/apps/bio/bio/envs/qiime2-2017.8/lib/python3.5/site-packages/patsy/eval.py", line 566, in eval
    data)
  File "/share/apps/bio/bio/envs/qiime2-2017.8/lib/python3.5/site-packages/patsy/eval.py", line 551, in _eval
    inner_namespace=inner_namespace)
  File "/share/apps/bio/bio/envs/qiime2-2017.8/lib/python3.5/site-packages/patsy/compat.py", line 124, in call_and_wrap_exc
    exec("raise new_exc from e")
  File "<string>", line 1, in <module>
patsy.PatsyError: Error evaluating factor: NameError: name 'Extraction' is not defined
    Extraction
    ^^^^^^^^^^

When running the command:

qiime gneiss ols-regression --p-formula "Extraction" --i-table no1_balances.qza --i-tree no1_hierarchy.qza --m-metadata-file no1_mapping_v2.txt --o-visualization no1_regression_summary.qzv

Extraction is the name of one of my columns in my mapping data file, which passed QIIME1’s validation check for mapping files.

I’m a bit baffled as to how to proceed, especially since I’m getting different error messages in each case, and I can’t seem to find any other messages on the forum having the same issues. Is this a function of an out of date QIIME2? If not, where should I start trouble shooting?

Thanks

Hi @willowblade!

We are only able to provide official support for the latest QIIME 2 release (2017.12) at this time. I recommend contacting your cluster administrator to see about updating to 2017.12 (a lot has happened since 2017.8!). Another option is to install Miniconda in your home directory to avoid needing root access. I’d recommend checking with your cluster administrator first to make sure it’s okay to do that though.

1 Like

Hi!

Thanks for the quick response, I now have access to an updated version of QIIME2!

The good news: The tutorial now works perfectly.

The bad news: Still had trouble with my data.

The better news: The problem was because of missing data that I thought was included, so the problem is solved.

3 Likes

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.