bioexcel / biobb_vs

Biobb_vs is the Biobb module collection to perform virtual screening studies.
https://mmb.irbbarcelona.org/biobb/
Apache License 2.0
1 stars 2 forks source link

Need to update code to remove `--log` argument for Autodock Vina #4

Closed BJWiley233 closed 1 year ago

BJWiley233 commented 2 years ago

Hi,

I installed biobb and everything works fine until I get to running Autodock Vina wrapper. They changed the code back in June 2020 to remove --log for new --verbosity argument. See here. Now I tried updating the code in my distribution installed with conda at site-packages/biobb_vs/vina/autodock_vina_run.py but when I update this code for new cmd to look like below, it still calls the old cmd in the log to the python kernel. I am not sure how you implement your wrappers buy maybe it is really calling the cython compiled autodock_vina_run?

Code update to autodock_vina_run.py (which I will see when removing the log from the call to this program, but something else gets ran to keep --log in the call when correctly calling the program)

cmd = [self.vina_path,
               '--ligand', self.io_dict["in"]["input_ligand_pdbqt_path"],
               '--receptor', self.io_dict["in"]["input_receptor_pdbqt_path"],
               '--center_x=' + x0, '--center_y=' + y0, '--center_z=' + z0,
               '--size_x=' + sidex, '--size_y=' + sidey, '--size_z=' + sidez,
               '--ou', self.io_dict["out"]["output_pdbqt_path"],
               #'--log', self.io_dict["out"]["output_log_path"]]
               '--verbose', 2]

but this still shows with correct call (so I think it's really calling site-packages/biobb_vs/vina/__pycache__/autodock_vina_run.cpython-37.pyc???). --log should be replaced with --verbose 2 correct?

/tools/biobb/biobb_wf_virtual-screening/bin/vina_1.2.3_mac_x86_64 --ligand prep_ligand.pdbqt --receptor prep_receptor.pdbqt --center_x=-4.684 --center_y=-9.189 --center_z=-6.927 --size_x=21.421 --size_y=19.066 --size_z=17.943 --out output_vina.pdbqt --log t.log
gbayarri commented 2 years ago

Hi,

The BioBB's rely on conda dependencies for working properly. In this case, the autodock vina developers have changed this property in the 1.2.3 version, but this version is not still in conda:

https://anaconda.org/search?q=autodock+vina

So for now, we must keep using the 1.2.2 version for the BioBB's. Once the 1.2.3 version is in conda, we will work on replacing it in the biobb_vs package.

In other BioBB's you could use your own distribution, but in this case, what you should do is to install biobb_vs in a conda environment. Conda will take car of installing the 1.2.2 version inside this environment, but outside it you will be able to use your own 1.2.3 version with no problems.

But if you need to use the 1.2.3 version, you can do as you said in your message: change manually the autodock_vina_run.py code in your computer.

Best.

BJWiley233 commented 2 years ago

Thanks,

I think the issue is that vina from conda installation doesn't work on new OS of macOS. See here, this is same error I get. Also version 1.2.2 of vina even has verbosity in replacement of log, so I think you mean version 1.1.2.

Brian

gbayarri commented 2 years ago

Yes, 1.1.2, sorry.

https://anaconda.org/bioconda/autodock-vina

Best.

Sandhesh121 commented 2 years ago

For anyone encountering an issue with using the --log command (unrecognised option) when running AutoDock VINA v1.2.3 (this is how I first got to this page), here's a link that might help: https://www.reddit.com/r/bioinformatics/comments/xfsvq3/autodock_vina_virtual_screening_issue/

PauAndrio commented 1 year ago

Adding to this question, now autodock-vina 1.2.3 is on conda-forge, and it works with macOS but --log argument it's still an issue:

Old vina 1.1.2: https://anaconda.org/bioconda/autodock-vina New vina 1.2.3: https://anaconda.org/conda-forge/vina

gbayarri commented 1 year ago

biobb_vs has been updated to autodock-vina 1.2.3 in the new 4.0.0 version