Error on alpha-group-significance on Qiime2-2017.2

Hi,

I tried the following code and got this error:

(qiime2-2017.2) dhcp-morris-2174:ASCC ErikaGanda$ qiime diversity alpha-group-significance   --i-alpha-diversity samp2/evenness_vector.qza   --m-metadata-file samp2map.txt   --o-visualization samp2/evenness-group-significance.qzv --verbose


Traceback (most recent call last):
  File "/Users/ErikaGanda/miniconda3/envs/qiime2-2017.2/lib/python3.5/site-packages/pandas/core/series.py", line 711, in _get_values
    return self._constructor(self._data.get_slice(indexer),
  File "/Users/ErikaGanda/miniconda3/envs/qiime2-2017.2/lib/python3.5/site-packages/pandas/core/internals.py", line 4135, in get_slice
    return self.__class__(self._block._slice(slobj),
  File "/Users/ErikaGanda/miniconda3/envs/qiime2-2017.2/lib/python3.5/site-packages/pandas/core/internals.py", line 252, in _slice
    return self.values[slicer]
IndexError: index 1000 is out of bounds for axis 1 with size 177

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/ErikaGanda/miniconda3/envs/qiime2-2017.2/lib/python3.5/site-packages/q2cli-2017.2.0-py3.5.egg/q2cli/commands.py", line 217, in __call__
    results = action(**arguments)
  File "<decorator-gen-162>", line 2, in alpha_group_significance
  File "/Users/ErikaGanda/miniconda3/envs/qiime2-2017.2/lib/python3.5/site-packages/qiime2-2017.2.0-py3.5.egg/qiime2/sdk/action.py", line 171, in callable_wrapper
    output_types, provenance)
  File "/Users/ErikaGanda/miniconda3/envs/qiime2-2017.2/lib/python3.5/site-packages/qiime2-2017.2.0-py3.5.egg/qiime2/sdk/action.py", line 305, in _callable_executor_
    ret_val = callable(output_dir=temp_dir, **view_args)
  File "/Users/ErikaGanda/miniconda3/envs/qiime2-2017.2/lib/python3.5/site-packages/q2_diversity-2017.2.0-py3.5.egg/q2_diversity/_alpha/_visualizer.py", line 46, in alpha_group_significance
    metadata_category = metadata_category[alpha_diversity.index]
  File "/Users/ErikaGanda/miniconda3/envs/qiime2-2017.2/lib/python3.5/site-packages/pandas/core/series.py", line 644, in __getitem__
    return self._get_with(key)
  File "/Users/ErikaGanda/miniconda3/envs/qiime2-2017.2/lib/python3.5/site-packages/pandas/core/series.py", line 678, in _get_with
    return self._get_values(key)
  File "/Users/ErikaGanda/miniconda3/envs/qiime2-2017.2/lib/python3.5/site-packages/pandas/core/series.py", line 714, in _get_values
    return self._values[indexer]
IndexError: index 1000 is out of bounds for axis 1 with size 177

Plugin error from diversity:

  index 1000 is out of bounds for axis 1 with size 177

See above for debug info.

My sample identifiers are all numbers. Is this where the error is coming from? I checked my metadata file and only have 177 rows in it.
This is a heading of my map/metadata

#SampleID	BarcodeSequence
598	        GTCTAATTCCGA
599	        TCCGAATTCACA

I have changed the .qza from my file to .tar and took a look at the alpha-diversity.tsv file and have the following heading:

        faith_pd
1000	21.107390324
1001	17.255422868000004

Is qiime thinking that this 1000 (identifier) is actually the index 1000?

Thank you and sorry for the long post!

Hi @ErikaGanda! It looks like your alpha diversity results contain sample IDs that are “1000” and “1001”, and those sample IDs are not in your mapping file. Each sample in your alpha diversity results needs to be in your mapping file (the mapping file can have extra samples though). Did you remove samples “1000” and “1001” from your mapping file at some point? Or maybe these alpha diversity results are meant to be paired with a different mapping file?

1 Like

I just checked the mapping file and I do have 1000 and 1001 in both mapping file (samp2map.txt) and the alpha-diversity.tsv that was created using qiime diversity core-metrics

Any ideas?

Thanks!

Can you send me the samp2/evenness_vector.qza and samp2map.txt files so I can take a look? It’s possible that using integers for sample IDs is causing issues (that’d be a bug on our end; integer IDs should be allowed).

1 Like

Sure! Here you go!

evenness_vector.qza (66.5 KB)
samp2map.txt (22.6 KB)

Here is the code I ran:

qiime diversity core-metrics
--i-phylogeny rooted-tree.qza
--i-table samp2-table.qza
--p-sampling-depth 2144
--output-dir samp2

qiime diversity alpha-group-significance
--i-alpha-diversity samp2/faith_pd_vector.qza
--m-metadata-file samp2map.txt
--o-visualization samp2/faith-pd-group-significance.qzv

Thanks! I was able to reproduce the issue locally and found that it is indeed a bug. I submitted a bug report here.

I suspect you’re going to have issues using integer sample IDs in other methods besides alpha-group-significance. This is something we will fix in one of the upcoming releases, but in the meantime you’ll need to rename the sample IDs in your metadata mapping file so that they aren’t numbers. Then you’ll need to start over with your analysis so that your demultiplexed sequences are mapped to the renamed sample IDs in your mapping file.

I know this is a lot to ask, but there isn’t a great workaround at this point. Thank you for reporting this bug; this will be a high priority for us to fix.

Thanks,

I figured that was going to happen and started my analysis all over again. =’(

Keep up the good work!

Erika

1 Like

An off-topic reply has been split into a new topic: Trouble renaming sample IDs with paired-end sequence data

Please keep replies on-topic in the future.

An off-topic reply has been split into a new topic: Longitudinal error - index out of bounds

Please keep replies on-topic in the future.