I have a list of drug IDs. I need to search for each drug ID on a website (ebi.ac.uk/chembl) which is a database, and get information on the drug, including their structure and other details, and list them in a table.
I think one way I can do this is by writing a command to each time put the drug ID at the end of the url and extract the information for each drug. for example this is the list of drug IDs:
CHEMBL3126679
CHEMBL3126678
CHEMBL478673
CHEMBL2386960
CHEMBL2326937
CHEMBL1258156
CHEMBL393858
and this is the URL that contains the information for one drug:
https://www.ebi.ac.uk/chembl/compound/inspect/CHEMBL3126679
The last part should be changed every time.
What command can I use to achieve this?
wget
orcurl
. You might have to further parse the response to extract all useful information. Anyway, that whole process is always specific to a single site, so your question is too broad as it is. Please clarify. – Byte Commander Apr 24 '18 at 07:35curl
,wget
, ...) and how to pick the data from the response.curl https://www.ebi.ac.uk/chembl/compound/inspect/CHEMBL3126679
works, but the result contains a lot of JS code so I don't think it is that easy. I haven't analysed it in detail, though. – PerlDuck Apr 24 '18 at 10:00