when running sourcetracker2 erro

table.qza (31.0 KB)
map1.txt (248 Bytes)
I
would like to ask why such an error occurs when running sourcetracker2. The submission is in accordance with the prescribed format. I don’t know where the mistake is. I submitted the original data. Can any teachers help me answer it? #SampleID's# I also tried to remove it, but it couldn't be solved~

Erro: Plugin error from sourcetracker2:
could not broadcast input array from shape (4,) into shape (3,)
Debug info has been saved to /var/folders/00/mxydynhx4xz8_073spn4lmqh0000gn/T/qiime2-q2cli-err-876rayir.log

(qiime2-amplicon-2023.9) happy@bogon Amplicon % cat /var/folders/00/mxydynhx4xz8_073spn4lmqh0000gn/T/qiime2-q2cli-err-3hek545h.log
Traceback (most recent call last):
File "/Users/happy/opt/anaconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2cli/commands.py", line 520, in call
results = self._execute_action(
File "/Users/happy/opt/anaconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2cli/commands.py", line 581, in _execute_action
results = action(**arguments)
File "", line 2, in gibbs
File "/Users/happy/opt/anaconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/qiime2/sdk/action.py", line 342, in bound_callable
outputs = self.callable_executor(
File "/Users/happy/opt/anaconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/qiime2/sdk/action.py", line 566, in callable_executor
output_views = self._callable(**view_args)
File "/Users/happy/opt/anaconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/sourcetracker/_gibbs.py", line 54, in gibbs
results = gibbs_helper(feature_table, sample_metadata, loo, jobs,
File "/Users/happy/opt/anaconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/sourcetracker/_gibbs.py", line 189, in gibbs_helper
mpm, mps, fas = _gibbs(csources, sinks, alpha1, alpha2, beta, restarts,
File "/Users/happy/opt/anaconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/sourcetracker/_sourcetracker.py", line 793, in gibbs
return collate_gibbs_results([i[0] for i in results],
File "/Users/happy/opt/anaconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/sourcetracker/_sourcetracker.py", line 951, in collate_gibbs_results
props, props_stds = cumulative_proportions(all_envcounts, source_ids,
File "/Users/happy/opt/anaconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/sourcetracker/_sourcetracker.py", line 847, in cumulative_proportions
proportions[i] = envcounts.sum(0) / envcounts.sum()
ValueError: could not broadcast input array from shape (4,) into shape (3,)

qiime sourcetracker2 gibbs \

**--i-feature-**table table.qza \

**--m-sample-metadata-file map1.**txt \

**--p-source-sink-**column SourceSink \

**--p-**loo \

--p-source-column-value source \

--p-sink-column-value sink \

**--p-source-category-**column Env \

**--output-dir qiime2-results/sourcetracker-**loo

Hi @zhz,
I don't think any of our qiime2 moderators know why this is happening .
I have pinged one of the maintainers of the sourcetracker project. We will see if they have any suggestions.

1 Like

Hi @zhz,
Can you send your table.qzv so I can take a look?

The maintainer of sourcetracker2 says that this happens when there are no sinks. But I see that there are sinks in your metadata.

1 Like

DaqufeatureTable.biom (112.2 KB)
DaqufeatureTable.txt (120.3 KB)
DaqufeatureTable.qzv (409.4 KB)
DaqufeatureTable.qza (31.0 KB)
metadata.txt (262 Bytes)

According to the operation after last month's update, the error is still reported. My purpose is to see the 5 time nodes, FQ1 to JP stage, and each perform microbial traceability analysis on the latter node.