NBChub / bgcflow

Snakemake workflow for the analysis of biosynthetic gene clusters across large collections of genomes (pangenomes)
https://github.com/NBChub/bgcflow/wiki
MIT License
29 stars 7 forks source link

BiGSCAPE CovergenceWarning: will not have any cluster centers #135

Closed OmkarSaMo closed 2 years ago

OmkarSaMo commented 2 years ago

Getting following future warning multiple time but still not an issue for completion of the run

/home/omkar/.local/lib/python3.6/site-packages/sklearn/cluster/_affinity_propagation.py:154: FutureWarning: 'random_state' has been introduced in 0.23. It will be set to None starting from 1.0 (renaming of 0.25) which means that results will differ at every function call. Set 'random_state' to None to silence this warning, or to 0 to keep the behavior of versions <0.23.
  FutureWarning

However following error stopped the run where no cluster centers were found leading to index out of range error

/home/omkar/.local/lib/python3.6/site-packages/sklearn/cluster/_affinity_propagation.py:247: ConvergenceWarning: Affinity propagation did not converge, this model will not have any cluster centers.
  "will not have any cluster centers.", ConvergenceWarning)
Traceback (most recent call last):
  File "resources/BiG-SCAPE/bigscape.py", line 3286, in <module>
    htmlFolder=network_html_folder)
  File "resources/BiG-SCAPE/bigscape.py", line 1771, in clusterJsonBatch
    clanLabels = [familyIdx[exemplarsClans[labelsClans[i]]] for i in range(len(familyIdx))]
  File "resources/BiG-SCAPE/bigscape.py", line 1771, in <listcomp>
    clanLabels = [familyIdx[exemplarsClans[labelsClans[i]]] for i in range(len(familyIdx))]
IndexError: list index out of range
OmkarSaMo commented 2 years ago

https://github.com/medema-group/BiG-SCAPE/issues/2 Found similar issues

matinnuhamunada commented 2 years ago

I guess this issue also depends on the inputs? Might be good to have a test case.