Hi @SoilRotifer thank you for the tutorial. I am facing a similar issue where the dereplication steps of the original data, and the extracted primer region area worked well, but once I perform the first iteration, I get the following error:
qiime rescript dereplicate \
--i-sequences seq_filt_ext_derep_cull_i01.qza \
--i-taxa tax_noSH_derep.qza \
--p-mode 'uniq' \
--p-threads 8 \
--o-dereplicated-sequences seq_filt_ext_derep_cull_i01derep.qza \
--o-dereplicated-taxa tax_noSH_derep_i01derep.qza
Plugin error from rescript:
'SH1089862.09FU_UDB0271834_reps'
Debug info has been saved to /tmp/qiime2-q2cli-err-0aqs4xl0.log
And here is the debug file:
Running external command line application. This may print messages to stdout and/or stderr.
The command being run is below. This command cannot be manually re-run as it will depend on temporary files that no longer exist.
Command: vsearch --derep_fulllength /tmp/qiime2/ortmannac/data/1e88da8d-3b2d-4b62-aafc-0ed595311a2d/data/dna-sequences.fasta --output /tmp/tmpo935_3m5 --uc /tmp/tmpk3z0k2z1 --xsize --threads 8
WARNING: The derep_fulllength command does not support multithreading.
Only 1 thread used.
vsearch v2.22.1_linux_x86_64, 15.5GB RAM, 12 cores
https://github.com/torognes/vsearch
Dereplicating file /tmp/qiime2/ortmannac/data/1e88da8d-3b2d-4b62-aafc-0ed595311a2d/data/dna-sequences.fasta 100%
65787437 nt in 230904 seqs, min 34, max 2166, avg 285
minseqlength 32: 13 sequences discarded.
Sorting 100%
228535 unique sequences, avg cluster 1.0, median 1, max 23
Writing FASTA output file 100%
Writing uc file, first part 100%
Writing uc file, second part 100%
Traceback (most recent call last):
File "/home/ortmannac/miniconda3/envs/qiime2/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 3802, in get_loc
return self._engine.get_loc(casted_key)
File "pandas/_libs/index.pyx", line 138, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 165, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 5745, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 5753, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'SH1089862.09FU_UDB0271834_reps'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/ortmannac/miniconda3/envs/qiime2/lib/python3.8/site-packages/q2cli/commands.py", line 520, in __call__
results = self._execute_action(
File "/home/ortmannac/miniconda3/envs/qiime2/lib/python3.8/site-packages/q2cli/commands.py", line 581, in _execute_action
results = action(**arguments)
File "<decorator-gen-740>", line 2, in dereplicate
File "/home/ortmannac/miniconda3/envs/qiime2/lib/python3.8/site-packages/qiime2/sdk/action.py", line 342, in bound_callable
outputs = self._callable_executor_(
File "/home/ortmannac/miniconda3/envs/qiime2/lib/python3.8/site-packages/qiime2/sdk/action.py", line 566, in _callable_executor_
output_views = self._callable(**view_args)
File "/home/ortmannac/miniconda3/envs/qiime2/lib/python3.8/site-packages/rescript/dereplicate.py", line 66, in dereplicate
derep_taxa, seqs_out = _dereplicate_taxa(
File "/home/ortmannac/miniconda3/envs/qiime2/lib/python3.8/site-packages/rescript/dereplicate.py", line 131, in _dereplicate_taxa
uc['Taxon'] = uc['seqID'].apply(lambda x: taxa.loc[x])
File "/home/ortmannac/miniconda3/envs/qiime2/lib/python3.8/site-packages/pandas/core/series.py", line 4771, in apply
return SeriesApply(self, func, convert_dtype, args, kwargs).apply()
File "/home/ortmannac/miniconda3/envs/qiime2/lib/python3.8/site-packages/pandas/core/apply.py", line 1123, in apply
return self.apply_standard()
File "/home/ortmannac/miniconda3/envs/qiime2/lib/python3.8/site-packages/pandas/core/apply.py", line 1174, in apply_standard
mapped = lib.map_infer(
File "pandas/_libs/lib.pyx", line 2924, in pandas._libs.lib.map_infer
File "/home/ortmannac/miniconda3/envs/qiime2/lib/python3.8/site-packages/rescript/dereplicate.py", line 131, in <lambda>
uc['Taxon'] = uc['seqID'].apply(lambda x: taxa.loc[x])
File "/home/ortmannac/miniconda3/envs/qiime2/lib/python3.8/site-packages/pandas/core/indexing.py", line 1073, in __getitem__
return self._getitem_axis(maybe_callable, axis=axis)
File "/home/ortmannac/miniconda3/envs/qiime2/lib/python3.8/site-packages/pandas/core/indexing.py", line 1312, in _getitem_axis
return self._get_label(key, axis=axis)
File "/home/ortmannac/miniconda3/envs/qiime2/lib/python3.8/site-packages/pandas/core/indexing.py", line 1260, in _get_label
return self.obj.xs(label, axis=axis)
File "/home/ortmannac/miniconda3/envs/qiime2/lib/python3.8/site-packages/pandas/core/generic.py", line 4056, in xs
loc = index.get_loc(key)
File "/home/ortmannac/miniconda3/envs/qiime2/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 3804, in get_loc
raise KeyError(key) from err
KeyError: 'SH1089862.09FU_UDB0271834_reps'
I installed rescript within a conda-installed qiime environment v2023.9.
Thank you!