When fetching metadata containing some duplicated keys, the processing fails.
Steps to reproduce:
fetch metadata for sample SRR5498984 with qiime fondue get-metadata ...
Expected behaviour:
metadata gets fetched without an issue
the non-required metadata fields should rather all be included with a suffix in case of duplicates
Actual behaviour:
fetching fails with the following error ("BioSampleModel" is duplicated):
Traceback (most recent call last):
File "/Users/mziemski/miniconda3/envs/fondue/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/Users/mziemski/miniconda3/envs/fondue/lib/python3.8/site-packages/entrezpy/requester/threadedrequest.py", line 48, in run
self.run_one_request(request, analyzer)
File "/Users/mziemski/miniconda3/envs/fondue/lib/python3.8/site-packages/entrezpy/requester/threadedrequest.py", line 71, in run_one_request
analyzer.parse(response, request)
File "/Users/mziemski/miniconda3/envs/fondue/lib/python3.8/site-packages/q2_fondue/entrezpy_clients/_efetch.py", line 295, in parse
self.analyze_result(response, request)
File "/Users/mziemski/miniconda3/envs/fondue/lib/python3.8/site-packages/q2_fondue/entrezpy_clients/_efetch.py", line 289, in analyze_result
self.result.add_metadata(response, request.uids)
File "/Users/mziemski/miniconda3/envs/fondue/lib/python3.8/site-packages/q2_fondue/entrezpy_clients/_efetch.py", line 265, in add_metadata
self.metadata[uid] = self._process_single_run(
File "/Users/mziemski/miniconda3/envs/fondue/lib/python3.8/site-packages/q2_fondue/entrezpy_clients/_efetch.py", line 71, in _process_single_run
processed_meta = self._extract_custom_attributes(
File "/Users/mziemski/miniconda3/envs/fondue/lib/python3.8/site-packages/q2_fondue/entrezpy_clients/_efetch.py", line 107, in _extract_custom_attributes
raise DuplicateKeyError(
q2_fondue.entrezpy_clients._efetch.DuplicateKeyError: One of the metadata keys (BioSampleModel) is duplicated.
When fetching metadata containing some duplicated keys, the processing fails.
Steps to reproduce:
qiime fondue get-metadata ...
Expected behaviour:
Actual behaviour: