Hi @sbslee!
I got an error when running the code below
dokdo prepare-lefse -t dada2_table.qza -x taxonomy.qza -m sample-metadata2.tsv -o input_table.tsv -c type -u SampleID
The error is
Traceback (most recent call last):
File "/Users/lymots/anaconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 3081, in get_loc
return self._engine.get_loc(casted_key)
File "pandas/_libs/index.pyx", line 70, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 101, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 4554, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 4562, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'SampleID'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/lymots/anaconda3/envs/qiime2-2022.2/bin/dokdo", line 8, in
sys.exit(main())
File "/Users/lymots/anaconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/dokdo/main.py", line 294, in main
commandscommand
File "/Users/lymots/anaconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/dokdo/cli/prepare_lefse.py", line 96, in prepare_lefse
df.insert(1, subject_col, df.pop(subject_col))
File "/Users/lymots/anaconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/pandas/core/frame.py", line 4512, in pop
return super().pop(item=item)
File "/Users/lymots/anaconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/pandas/core/generic.py", line 769, in pop
result = self[item]
File "/Users/lymots/anaconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/pandas/core/frame.py", line 3024, in getitem
indexer = self.columns.get_loc(key)
File "/Users/lymots/anaconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 3083, in get_loc
raise KeyError(key) from err
KeyError: 'SampleID'
And when I delete the -u SampleID
, there is no error.
Do you know how could I fixed this?
Thank you!