Yet more trouble with Gneiss

Hi,

I am using QIIME2-2017.12

I am apparently exceptionally dense when using Gneiss, as I have encountered yet another issue. Before running Gneiss, I am filtering my dataset down to include just one set of well matched case and control subjects using a single extraction method (so I exclude several samples from analysis, and wind up with a bunch of sequences that do not have any reads, in case that matters). I am able to run Gneiss without a problem until I reach the balance-taxonomy step and try to see which taxa are involved in the balances that are significantly different between my cases and controls.

As an example of the code I'm running:

qiime gneiss balance-taxonomy \
  --i-table lupus_cc_composition_for_bt.qza \
  --i-tree lupus_cc_hierarchy_for_bt.qza \
  --i-taxonomy lupus_taxonomy.qza \
  --p-taxa-level 2 \
  --p-balance-name 'y1687' \
  --m-metadata-file lupus_cc_balance_regression_meta.txt \
  --m-metadata-category Case \
  --o-visualization y1687_cc_taxa_summary.qzv

However, after a few minutes, I get the following error message, regardless of which balance I am trying to look at:

Plugin error from gneiss:

  Unalignable boolean Series provided as indexer (index of the boolean Series and of the indexed object do not match

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

Looking at the log file, I see:

/share/apps/bio3user/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-packages/
gneiss-0.4.2-py3.5.egg/gneiss/util.py:181: FutureWarning: '.reindex_axis' is dep
recated and will be removed in a future version. Use '.reindex' instead.
/share/apps/bio3user/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-packages/
matplotlib/axes/_base.py:2961: UserWarning: Attempting to set identical left==ri
ght results
in singular transformations; automatically expanding.
left=0.0, right=0.0
  'left=%s, right=%s') % (left, right))
Traceback (most recent call last):
  File "/share/apps/bio3user/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-p
ackages/q2cli/commands.py", line 224, in __call__
    results = action(**arguments)
  File "<decorator-gen-219>", line 2, in balance_taxonomy
  File "/share/apps/bio3user/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-p
ackages/qiime2/sdk/action.py", line 228, in bound_callable
    output_types, provenance)
  File "/share/apps/bio3user/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-packages/qiime2/sdk/action.py", line 424, in _callable_executor_
    ret_val = self._callable(output_dir=temp_dir, **view_args)
  File "/share/apps/bio3user/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-packages/q2_gneiss/plot/_plot.py", line 162, in balance_taxonomy
    if b.loc[lidx].mean() > b.loc[ridx].mean():
  File "/share/apps/bio3user/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-packages/pandas/core/indexing.py", line 1373, in __getitem__
    return self._getitem_axis(maybe_callable, axis=axis)
  File "/share/apps/bio3user/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-packages/pandas/core/indexing.py", line 1583, in _getitem_axis
    return self._getbool_axis(key, axis=axis)
  File "/share/apps/bio3user/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-packages/pandas/core/indexing.py", line 1388, in _getbool_axis
    key = check_bool_indexer(labels, key)
  File "/share/apps/bio3user/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-packages/pandas/core/indexing.py", line 2023, in check_bool_indexer
    raise IndexingError('Unalignable boolean Series provided as '
pandas.core.indexing.IndexingError: Unalignable boolean Series provided as indexer (index of the boolean Series and of the indexed object do not match

I have a suspicion that this might have something to do with the fact that the taxa file was generated using the full dataset, but the balance tree files were created using a subsetted dataset that did not include a bunch of sequence variants, but I am uncertain how to test this as I have no idea how to filter out the representative sequences based on the sequences included in my subset. Do you think this is the problem? Or is there something else I'm missing? And do you have any suggestions on what I should try next?

Thanks again
Diana

Hi @willowblade. The error thrown seems to point to a mismatch issue between the FeatureTable and the Metadata sizes.

Could you report the number of samples within the FeatureTable and the Metadata?
It may also worthwhile to post the taxa file, biom table, tree, metadata to reproduce this issue.

Hi @mortonjt, I double checked, and it seems I have 30 samples in both the FeatureTable and the Metadata. I will try recreating both the FeatureTable and the metadata file, just in case there is something wrong with one or both that I’m missing. Does the order the samples appear in the files matter?

I don’t want to post unpublished data publicly, but if there is a way I could share the files directly with you and you feel it would help, I’d be willing to do that.

Thanks for the super fast response!

hi @willowblade I’m looking at the error message more carefully. That is actually an issue with the Metadata headers, not Gneiss. That issue has been fixed in the upcoming release of qiime2.

The quick workaround is to use the previous release of qiime2.

Downgrading QIIME 2 releases likely won’t solve the problem because Metadata handling hasn’t changed between QIIME 2 releases in awhile. There are big changes to Metadata that will be included in the next release (2018.2), but those aren’t live yet. In other words, whatever issue @willowblade is running into will be the same in 2017.12, 2017.11, etc.

Just to check up on this, did we ever identify what the issue with the header was in particular?

Hi @willowblade, sorry this has fallen off the tracks a bit — would you mind sending your files necessary to rerun the command above? You can send me links to them in a direct message, or, attach directly, if they are small enough. Thanks! :t_rex:

I will send the files by DM, but it may be tomorrow or Thursday before I have a chance to dig out and send the files, I’d archived them while waiting for the next the QIIME2 release.

1 Like

Thanks @willowblade — I was able to connect with @mortonjt offline, he hooked me up with your files that you previously sent to him. Stay tuned!

Hi @willowblade! I just ran the command you reported above, using the files you provided to @mortonjt in QIIME 2 2018.2 and everything appeared to work as expected. One minor change I had to make was to your sample metadata file - we added all new metadata handling in QIIME 2 2018.2, and one of the new rules has to do with the sample id column header (you have #Sample_ID, which is invalid, I replaced it with sample-id and that fixed the problem). To be clear, the issue wasn’t about your metadata file’s sample id label, but, if you run this in 2018.2 you will have an issue unless you rename that. Also related to that metadata change, the parameter --m-metadata-category was renamed to --pm-metadata-column.

I also ran this in 2017.12, just to double-check, and also was unable to reproduce the error you reported above. Long story short, give this a shot again (preferably using QIIME 2 2018.2) and let us know how it goes! :t_rex:

Thank you, I appreciate your time on this! Now I know what I’m doing tomorrow :slight_smile:

1 Like

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