Tuesday, 25 September 2018

How to do a substructure search of ChEMBL (2)

I previously wrote some notes on how to do a substructure search of ChEMBL.

I've been doing some more and found some funny/interesting things.

1) Strange things with aromatic rings!
I wanted to do a search that would hit both menadione (a napthaquinone, image from wikipedia):

Skeltal formula
and also hit anthraquinones like diacerein (image from wikipedia):
Structural formula of diacerein
I first tried this with this substructure but it only hit menadione and not the anthraquinones:










Then after discussing with Noel (thanks Noel!) I found out that I need to specify S/A (single/aromatic) and D/A (double/aromatic) bonds, like this:






This found both the anthraquinones and naphthaquinones, hurray!

Note: I found that the ability to specify S/A and D/A bonds is only available in the current ChEMBL website, not the new ChEMBL beta website, which seems to use a different sketcher from ChemAxon.
Note 2 (1-Oct-2018): I heard back from the ChEMBL website that you can specify S/A bond on the ChEMBL beta website by selecting the bond and pressing 14, and D/A by pressing 24 (and 'any' bond by pressing 0). Thanks to David Mendez from ChEMBL! 

2) Specifying any atom with 'A'
I wanted to do a search which would pick up both

and




I found I could do this with the 'A' (any atom), like this:




Note: on the ChEMBL beta website, I see '*', but if I select this and press 'A'  it turns to A.

3) Wierd things I can't explain

I found that when I do this attached substructure search

 it gets a hit to dipananone https://www.ebi.ac.uk/chembldb/index.php/compound/inspect/CHEMBL2111157 when I do the search using the ChEBML beta interface, but not when I do the exact same substructure search using the normal CHEMBL interface. I'm not sure why this is? I sent an email to the ChEMBL helpdesk, waiting for a reply...

4) Starting from a particular structure
If you have a problem drawing in your structure, you can save a related compound as its mol file from the ChEMBL website, and then click on the 'open file' button within the sketcher on the ChEMBL homepage, and open that mol file to be your starting point for editing.

Acknowledgements
Thanks to Noel O'Blog and John Mayfield for help!
And also a big thanks to David Mendez from ChEMBL!

Monday, 3 September 2018

CMYK versus RGB

I always forget the difference between RGB and CYMK images.
My colleague Adam Reid reminded me that RGB is best for viewing on screen, and CMYK for printing. Thanks Adam!

Compare documents using Word

I had two versions of some text and wanted to compare them using Word, so it would give the same annotation as if I had had 'track changes' turned on.

I tried this initially, but got a strange output from Word where it showed both versions of the text beside each other. After some fiddling, this is what worked:

(i) Paste one (the older) version of the text in one Word document. Accept all changes in the document. Save as 'oldversion'.
(ii) Paste the second (the newer) version of the text in a second Word document. Accept all changes in the document. Save as 'newversion'.
(iii) Quit Word and just one the one that is the 'newversion'.
(iv) Go to Tools -> Compare docs, and click on the down-arrow symbol to show all options, and select to show the changes in the newversion document.

Formatting references using EndNote

I need to format references in a paper, which has a main text Word document, and a supplementary Word document.

To ensure that EndNote starts the reference list in the supplementary Word document after the last number in the main text (e.g. if numbers 1-53 are in the main text, and 54 onwards in the supplementary) I did the following: (this is to remind me for the future!)

(i) Turn off 'track changes' in the supplementary doc, and paste in the introduction+results+discussion+methods from the main text document at the top of the supplementary document.
(ii) Format the bibliography in the supplementary document using EndNote, and save a copy of the merged document that contains the EndNote field codes. This converts the EndNote reference numbers to plain text, so EndNote no longer recognises them as references.
(iii) Then select 'remove field codes' in EndNote to remove the EndNote field codes from the merged document, and save a copy of the merged document without the EndNote field codes.
(iv) In the main text document, turn off 'track changes', and paste back in the Introduction+Results+Discussion+Methods with the formatted references, from the merged document without the EndNote field codes. Then paste in the reference list from the merged document without the EndNote field codes.

Note: By turning off 'track changes' in the supplementary and main text files for this part, you ensure that the copy and paste of the large chunk of text isn't just tracked as one huge insertion, so earlier small edits you made using 'track changes' turned on should still be recorded.

Note 2: Remember if you submit the version of the main text without the EndNote field codes, and the journal then asks you to make some changes, you will need to go back to editing the version of the merged document that still has EndNote field codes (not the version of the main text that you submitted, that lacks EndNote field codes). (Learnt the hard way : )