forlilab / Ringtail

Package for storage and analysis of virtual screenings run with AutoDock-GPU and AutoDock Vina
GNU Lesser General Public License v2.1
41 stars 7 forks source link

Problem with --plot option #64

Open xavgit opened 1 day ago

xavgit commented 1 day ago

Hi, I'm experimenting with the command line tutorial. I've issued the following: (ringtail) xxxx@xxxx-Lenovo-IdeaPad-S340-15API:\~/ringtail_tutorial$ rt_process_vs write --output_db all_adgpu --file_path /home/xxxx/sources/Ringtail-release/test/test_data/adgpu/ (ringtail) xxxx@xxxx-Lenovo-IdeaPad-S340-15API:~/ringtail_tutorial$ rt_process_vs read --input_db example.db --ligand_name 9441 1451 1620 --ligand_max_atom 15 --ligand_operator OR --mfpt_cluster --plot

Number of ligands passing filters: 227

I'm guessing that there is a problem in produced scatter.png as the bar is not in the right place.

I'm wrong?

Thanks.

Saverio

scatter

maylinnp commented 1 day ago

You're right, that bar is not in a good place. I will add this to my bugfix list to be pushed to the released code version soon.

In the meantime, if you are working with source code it is the following line that would need editing: Ringtail>ringtail>outputmanager.py>381: cax=self.ax.inset_axes([0.85, 0.1, 0.05, 0.8])

xavgit commented 1 day ago

Hi, thanks for the immediate reply. It is possible to set the image size?

Thanks.

Saverio

maylinnp commented 1 day ago

Yes it should be, I have not looked into this extensively but in the same file as before, line 359: to fig = plt.figure() you should be able to pass the argument figsize with a tuple of (width, height) in inches as per documentation. The plot functionality uses the matplotlib.pyplot library.

xavgit commented 1 day ago

Hi, thanks for the suggestion. It should be nice having an option like --plot_size width height

Thanks.

Saverio

diogomart commented 1 day ago

Hi, there's a lot customization one can do on a figure and doing it in Python directly is far more powerful. We can't reasonably expose part of the matplotlib interface as command line options as that would be a lot of options. However, one shouldn't need to modify ringtail's source to edit the figure, ringtail should be able to return something like the x and y values, or a figure object, from its API. Maybe this is possible already, I didn't check.

xavgit commented 1 day ago

Ok You are right.

Thanks.

Saverio