Sometimes when you import a dataset into a Vortex workspace the default display can be not ideal. For example I imported this CDK7 dataset from ChEMBL as shown below.

All the data is there but with generic column headers, some not useful columns and not in the best order. However, you can customise the display with a Vortex script.

Vortex display setup script

The script is shown below, the first part is simply a boilerplate of useful imports. The next block simply hides columns that are not needed. You can of course delete these columns. The next step is to rename some columns to something more memorable.

We can also use the script to calculate some properties, only two are shown but Vortex can calculate a whole variety of properties and descriptors.

The next step moves the columns into the order desired. The format for the command is

vtable.moveColumnTo(‘Column to move’, ‘Move to right of this column’)

You can also fix or unfix columns.

The final part is to add colour formatting

Setting the colouring scheme is done on each individual column. You have 3 options: ColoringMode 0 = the default heat map (min value green high value red) ColoringMode 1 = Custom colour in simple mode, the one you get on the first pane in the Configure.. menu when you right click a column and select ‘Coloring’. ColoringMode 2 = Custom color in advanced mode,  the second pane in Coloring > Configure menu. This one you need to by hand in the GUI and then export as a large string that you then have in you code.

If you whant the advanced scheme it is probably best of setting it by hand and then getting the full coloring scheme string for that column and store it as a string that you can then apply to the column in your script. See the screen shot below.

Once you have a colour scheme you like you can then get the code by typing in the Vortex terminal

You can then use this string in the script above.

The result is shown below.

Related Posts