Connect with us

Bioinformatics Programming

How to sort binding affinities based on a cutoff using vs_analysis.py script?

Published

on

How to sort binding affinities based on a cutoff using vs_analysis.py script?

Previously, we have provided a Python script (vs_analysis.py) to analyze the virtual screening (VS) results of Autodock Vina. Now, we have updated this script to sort binding affinities based on user inputted cutoff value.

As explained in the previous article, users can easily get the binding affinities of top poses of a desired number of compounds after VS using Vina. This updated script also allows sorting log files based on a binding affinity cutoff provided by the user.

This is an interactive Python script, so users can choose whether they want to sort on the basis of a binding affinity threshold or just get the desired number of compounds having the lowest binding affinities.

Usage

Download the file from our GitHub and Bitbucket accounts (details are given in the following section) and save it in the directory where you have kept all log files. If you will save it elsewhere, don’t forget to provide the full path to this file. It will run on Linux as well as on Windows.

Run it using Python 3.x.

$ python3 vs_analysis.py

OR if Python 3.x is in your path then just type the following:

$ python vs_analysis.py

If you have chosen to sort on the basis of a cutoff value, then the output will be provided in an output file named ‘ba_output.txt’. Otherwise, the output will be in a file named ‘output.txt’. These files will be consisting of the filename and the corresponding binding affinity in front.

Example (with a threshold):

You have the same number of log files in your directory and you want to fetch the results/poses sorted with the lowest binding affinities based on a threshold. Then run the above command and while prompted, type ‘y’ or ‘yes’ and then enter a cutoff value, for instance, enter -9. It will provide the compounds having binding affinity higher than -9 in the ‘ba_output.txt’ file.

To sort without a cutoff value, read this article.

Availability

The script is freely available to download from our GitHub account.


NOTE:

  • This script screens for the log files containing the word ‘log’ in their filenames, e.g., “log_compound1.txt” or “log_methanol.txt”
  • It is recommended to name your log files along with the name of a compound. That would make the results more presentable and easy to understand. For example, you can name them as “log_naphthalene.txt” or so.

 

Dr. Muniba is a Bioinformatician based in New Delhi, India. She has completed her PhD in Bioinformatics from South China University of Technology, Guangzhou, China. She has cutting edge knowledge of bioinformatics tools, algorithms, and drug designing. When she is not reading she is found enjoying with the family. Know more about Muniba

Bioinformatics Programming

How to make swarm boxplot?

Published

on

How to make swarm boxplot?

With the new year, we are going to start with a very simple yet complicated topic (for beginners) in bioinformatics. In this tutorial, we provide a simple code to plot swarm boxplot using matplotlib and seaborn. (more…)

Continue Reading

Bioinformatics Programming

How to obtain ligand structures in PDB format from PDB ligand IDs?

Published

on

How to obtain ligand structures in PDB format from PDB ligand IDs?

Previously, we provided a similar script to download ligand SMILES from PDB ligand IDs. In this article, we are downloading PDB ligand structures from their corresponding IDs. (more…)

Continue Reading

Bioinformatics Programming

How to obtain SMILES of ligands using PDB ligand IDs?

Published

on

How to obtain SMILES of ligands using PDB ligand IDs?

Fetching SMILE strings for a given number of SDF files of chemical compounds is not such a trivial task. We can quickly obtain them using RDKit or OpenBabel. But what if you don’t have SDF files of ligands in the first place? All you have is Ligand IDs from PDB. If they are a few then you can think of downloading SDF files manually but still, it seems time-consuming, especially when you have multiple compounds to work with. Therefore, we provide a Python script that will read all Ligand IDs and fetch their SDF files, and will finally convert them into SMILE strings. (more…)

Continue Reading

LATEST ISSUE

ADVERT