Carrion-lab / bacLIFE

31 stars 5 forks source link

Error in bigscape_exe #16

Closed arunprasanna83 closed 1 month ago

arunprasanna83 commented 3 months ago

Hi, The program has been throwing error in bigscape_exe. I removed the environment, re-installed the bigscape env with conda. Deleted the intermediate files in bigscape_output and re-ran the program. But nothing works and getting the same error.

Calculating all pairwise distances /home/.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 /home/.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) generate_network took 164.198 seconds Removing 1120 non-relevant MIBiG BGCs Writing output files Calling Gene Cluster Families Cutoff: 0.3 Traceback (most recent call last): File "./intermediate_files/BiG-SCAPE/bigscape.py", line 3335, in main() File "./intermediate_files/BiG-SCAPE/bigscape.py", line 3028, in main clanCutoff=options.clan_cutoff, htmlFolder=network_html_folder) File "./intermediatefiles/BiG-SCAPE/bigscape.py", line 1462, in clusterJsonBatch labels[bgcExt2Int[bgcSub2Ext[i]]] = bgcExt2Int[bgcSub2Ext_[exemplarsSub[labelsSub[i]]]] IndexError: list index out of range [Sat Aug 10 20:45:39 2024] Error in rule bigscape_exe:

What could be the issue?

Thanks in advance.

gguerr001 commented 3 months ago

Could you share the version of big-scape installed in your bigscape_bacLIFE conda environment? Trying to run the bigscape command separetly using the intermediate_files/antismash folder as input can help to find the specific error. Try to run this command in the bigscape_bacLIFE conda environment

python ./intermediate_files/BiG-SCAPE/bigscape.py -i intermediate_files/antismash -o intermediate_files/BiG-SCAPE/bigscape_output/ --pfam_dir intermediate_files/PFAM/ --mode glocal --mibig --cutoffs 0.3 0.7 --include_singletons --cores 24 --mix

Trying to run the bigscape command separetly using the intermediate_files/antismash folder as input can help to find the specific error.

arunprasanna83 commented 2 months ago

Could you share the version of big-scape installed in your bigscape_bacLIFE conda environment? Trying to run the bigscape command separetly using the intermediate_files/antismash folder as input can help to find the specific error. Try to run this command in the bigscape_bacLIFE conda environment

python ./intermediate_files/BiG-SCAPE/bigscape.py -i intermediate_files/antismash -o intermediate_files/BiG-SCAPE/bigscape_output/ --pfam_dir intermediate_files/PFAM/ --mode glocal --mibig --cutoffs 0.3 0.7 --include_singletons --cores 24 --mix

Trying to run the bigscape command separetly using the intermediate_files/antismash folder as input can help to find the specific error.

Hi, I ran the command alone as you suggested. The error remains the same. Attached are the standard output and conda list -n bigscape_bacLIFE

conda_bigscape_environment.txt nohup.txt

arunprasanna83 commented 2 months ago

Hi Gurrero, Please help me resolve the issue. Thanks in advance.

gguerr001 commented 2 months ago

Hi, I just run a test and for me big-scape seems to works fine. Find attached the packages and versions of my bigscape environment. I wonder if the error could be caused by the input. The input folder for bigscape is intermediate_files/antismash . There should be one folder for each genome with the outputs from antismash in this folder. Maybe there is an incomplete one or that didn' t fully finished.

conda_bigscape_environment_Guillermo.txt

arunprasanna83 commented 2 months ago

Hi, I just run a test and for me big-scape seems to works fine. Find attached the packages and versions of my bigscape environment. I wonder if the error could be caused by the input. The input folder for bigscape is intermediate_files/antismash . There should be one folder for each genome with the outputs from antismash in this folder. Maybe there is an incomplete one or that didn' t fully finished.

conda_bigscape_environment_Guillermo.txt

Alright just found out the issue. The command is accessing affinity_propogation.py of sklearn from/home/.local/lib/python3.6 instead of /conda/miniforge3/envs/bigscape_bacLIFE/lib/python3.6/site-packages/sklearn/cluster/ from bigscape_bacLIFE environment. This lead to version conflict. After I removed the /home/.local/ from PYTHONPATH, it is working again.

Calculating all pairwise distances /home/.local/lib/python3.6/site-packages/sklearn/cluster/affinity_propagation.py:154: FutureWarning:

Thanks.

hildaha commented 1 month ago

Hi, Could you please help me?

I am encountering a similar issue as @arunprasanna83 while running Bigscape. The error seems to be coming from affinity propagation.py, although my command is accessing affinity propagation.py from Bigscape env, unlike what @arunprasanna83 was encountering. Attached is the output error message.

Error in bigscape_exec_Hilda.txt

Thanks in advance!

gguerr001 commented 1 month ago

Hi,

After looking to the output error I see that bacLIFE is accessing the affinity propagation.py through a bigscape environment which is not the one of bacLIFE (/data/bin/miniconda2/envs/bigscape-v1.1.9/lib/python3.7/site-packages/sklearn/cluster/_affinity_propagation.py).

The bigscape env of bacLIFE should be something like (/data/bin/miniconda2/envs/bigscape_bacLIFE/...). I believe the presence of other bigscape conda environment is creating the conflict. Maybe modifying the PYTHONPATH variable or removing the other conda environment can resolve the issue?

hildaha commented 1 month ago

Hi, The error seemed to come from using the most recent version of scikit-learn. Downgrading scikit-learn to an earlier version (0.19.2 ) resolves the issue.

Thank you, @gguerr001 !

gguerr001 commented 1 month ago

Good to know!! I'm trying to build a docker version to avoid these types of issues and knowing these incompatibilities are key

Thanks for sharing!