ZINC15:examples: Difference between revisions

From DISI
Jump to navigation Jump to search
(aasdf)
m (asdf)
 
(58 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{TOCright}}
= Introduction =
Here are examples of what you can do with ZINC15, organized by [[ZINC15:Levels]].


= Examples from the paper =  
= Public Access =
* [[ZINC15:examples:public]]
* [[ZINC15:videos]]
* [[ZINC15:examples:screening]]


== From the abstract ==
query ZINC using api
[[ZINC15:examples:abstract]]
time wget --user gpcr --password xtal -O - "http://zinc15.docking.org/substances.txt:smiles,zinc_id,purchasability?
purchasability:gt=10&mwt:le=350&mwt:gt=50&logp:le=3.5&structure.num_rotatable_bonds:le=7&structure:contains=[C;D1]%3D[CD3]C(%3DO)OC&count=all" | tee 18.txt | cat -n




== From the introduction ==
= Private access =  
1) “What is the nearest metabolite or drug to my compound?”
These require ssh access or a private copy of ZINC
* [[ZINC15:examples:private]]


zinc15.docking.org:8105/substances.txt?ecfp4.data:tanimoto,0.5=<url-encoded-smiles>
[[Category:Tutorials]]
thus for ZINC27,
zinc15.docking.org:8015/substances.txt?ecfp4.data:tanimoto,0.5=N[C@@H](CCc1ccc(N(CCCl)CCCl)cc1)C(=O)O
 
2) “Which FDA approved drugs are also metabolites?”
zinc15.docking.org:8015/substances?substance.features:contains=211,202&count=all
 
 
3) “Which compounds are in Drugbank but not in ChEMBL Drugstore?”
needs simple ipython notebook on sub_id
 
4) “Which genes have a ligand reported that binds at 10nM concentration or better?"
zinc15.docking.org:8015/activities.txt:gene.name?activities.affinitynm:ge=8&distinct=gene.name&count=all
 
 
5) “Which targets do hydroxamic acids bind to?”
zinc15.docking.org:8015/targets.txt:target.uniprot?structure.contains=C(=O)[ND2][OD1]&distinct=target.uniprot&count=all
 
6) “Which vendors sell the most biogenic compounds (natural products), and what are those compounds?”
zinc15.docking.org:8015/catitms.txt:catalog.short_name,catitm.supplier_code,substance.zinc_id,substance.smiles?catalog.np=1&count=all
 
7) “How many primary amines as for sale in preparative quantitites?”
zinc15.docking.org:8015/substances.txt?substance.structure:contains=[ND1]&catalog.bb=True&count=all
 
== From Results ==
 
== Table 2 - Genes, Uniprot codes and annotated compounds by affinity bin ==
(re-write these as webapi)
* * select organism_fk, count(gene_id) from gene group by organism_fk;
zinc15.docking.org/genes.txt:count(*)?group-by=organism_fk
 
* + select g.organism_fk, count(a.anno_id) from annotation a, gene g where a.gene_fk = g.gene_id group by g.organism_fk;
zinc15.docking.org/targets.txt:count(*)?group-by=gene.organism_fk
 
* $ select count(distinct(n.sub_id_fk)),g.organism_fk from gene g, annotation a, note n where g.gene_id = a.gene_fk and a.anno_id = n.anno_id_fk and n.affinitynm >= 9 group by g.organism_fk;
zinc15.docking.org/  not sure we can do this!
 
 
 
== Table 3 - Gene Target Classes ==
(re-write these as ZINCAPI if we can)
 
* * select count(g.gene_id),tc.major_class from target_class tc, gene g where g.target_class_fk = tc.target_class_id group by tc.major_class order by tc.major_class
 
* + select count(distinct(s.sub_id)),tc.major_class from gene g, substance s, note n, annotation a, target_class tc where g.gene_id = a.gene_fk and g.target_class_fk = tc.target_class_id and n.anno_id_fk = a.anno_id and s.sub_id = n.sub_id_fk and s.purchasability >20, 20, 10 group by tc.major_class
 
* $ select count(distinct(g.gene_id)), tc.major_class from target_class tc, gene g, substance s, note n, annotation a where s.sub_id = n.sub_id_fk and a.anno_id = n.anno_id_fk and a.gene_fk = g.gene_id and  g.target_class_fk = tc.target_class_id and s.purchasability > 9 group by tc.major_class;
 
 
== Table 4 - Chemical Diversity by Gene ==
 
4) histogram of clusters per gene.
select c.gene_fk, g.name, count(c.cluster_id) from cluster c, gene g where g.gene_id = c.gene_fk and c.ordinal = 1 group by c.gene_fk,g.name order by count(c.cluster_id) desc;
 
for any one pick the smiles:
select smiles,sub_id from substance where sub_id in (select rep_sub_id_fk from cluster where gene_fk = 57387 and ordinal=1);
 
another
select c.gene_fk, g.name, count(c.cluster_id) from cluster c, gene g where g.gene_id = c.gene_fk and c.ordinal = 1 group by c.gene_fk,g.name order by count(c.cluster_id) desc;
 
another
select gene_fk, count(cluster_id) from cluster where ordinal = 1 group by gene_fk order by count(cluster_id) desc ;
 
 
 
 
 
== Table 5 - Genes per compound as a function of affinity cutoff (polypharmacology) ==
this is almost for sure wrong:
 
select sub_id  count(sub_id_fk) from note as n join annotation as a on n.anno_id_fk = a.anno_id join gene as g on g.gene_id = a.gene_fk group by n.sub_id_fk having min(n.affinitynM) >= 9;
 
NEW
 
Non purch:
select count(sub_id_fk) as num_compounds, cgi as having_num_genes from (select n.sub_id_fk as sub_id_fk , count(distinct(g.gene_id)) as cgi from gene g, annotation a, note n where g.gene_id = a.gene_fk and a.anno_id = n.anno_id_fk and n.affinitynm >= 9 group by n.sub_id_fk) as t group by cgi order by cgi;
 
Heavy hitters:
select n.sub_id_fk as sub_id_fk , count(distinct(g.gene_id)) as cgi from gene g, annotation a, note n where g.gene_id = a.gene_fk and a.anno_id = n.anno_id_fk and n.affinitynm >= 9 group by n.sub_id_fk order by cgi desc limit 10;
 
Purch:
select count(sub_id_fk) as num_compounds, cgi as having_num_genes from (select n.sub_id_fk as sub_id_fk , count(distinct(g.gene_id)) as cgi from gene g, annotation a, note n, catalog_item ci, catalog c  where c.cat_id=ci.cat_id_fk and ci.sub_id_fk = n.sub_id_fk and g.gene_id = a.gene_fk and a.anno_id = n.anno_id_fk and n.affinitynm >= 8 and c.purchasable>9 group by n.sub_id_fk) as t group by cgi order by cgi;
 
Heavy hitters (purch):
select n.sub_id_fk as sub_id_fk , count(distinct(g.gene_id)) as cgi from gene g, annotation a, note n, catalog_item ci, catalog c  where c.cat_id=ci.cat_id_fk and ci.sub_id_fk = n.sub_id_fk and g.gene_id = a.gene_fk and a.anno_id = n.anno_id_fk and n.affinitynm >= 8 and c.purchasable>9 group by n.sub_id_fk
 
== Table 6 ==
 
1 compounds:
http://zincapi.ucsf.bkslab.org/v1/substances/txt:smiles,zinc_id/structure%20contains%20CS(=O)(=O)[ND1]&substance.purchasability%20gt%209
 
genes: 2
http://zincapi.ucsf.bkslab.org/v1/substances/txt:smiles,zinc_id/substance.purchasability%20gt%209&structure%20contains%20C(=O)[ND2][OD1]
 
3
http://zincapi.ucsf.bkslab.org/v1/substances/txt:smiles,zinc_id/substance.purchasability%20gt%209&structure%20contains%20cC(=O)[OD1]
4
 
http://zincapi.ucsf.bkslab.org/v1/substances/txt:smiles,zinc_id/substance.purchasability%20gt%209&structure%20contains%20CC(=O)[OD1]
5.
takes too long. Why for only 100?
 
http://zincapi.ucsf.bkslab.org/v1/substances/txt:smiles,zinc_id/substance.purchasability%20gt%209&structure%20contains%20[SH]
 
6.  Primary amines.
 
== Table 7 - What genes do warheads hit? ==
compounds:
http://zincapi.ucsf.bkslab.org/v1/substances/txt:smiles,zinc_id/structure%20contains%20CS(=O)(=O)[ND1]&substance.purchasability%20gt%209
 
 
http://zincapi.ucsf.bkslab.org/v1/substances/txt:smiles,zinc_id/substance.purchasability%20gt%209&structure%20contains%20C(=O)[ND2][OD1]
3
http://zincapi.ucsf.bkslab.org/v1/substances/txt:smiles,zinc_id/substance.purchasability%20gt%209&structure%20contains%20cC(=O)[OD1]
4
http://zincapi.ucsf.bkslab.org/v1/substances/txt:smiles,zinc_id/substance.purchasability%20gt%209&structure%20contains%20CC(=O)[OD1]
5.
takes too long. Why for only 100?
http://zincapi.ucsf.bkslab.org/v1/substances/txt:smiles,zinc_id/substance.purchasability%20gt%209&structure%20contains%20[SH]
 
 
 
== Table 8A ==
 
1. http://zincapi.ucsf.bkslab.org/v1/substances/txt:smiles,zinc_id/substance.features%20contains%20201,
2. http://zincapi.ucsf.bkslab.org/v1/substances/txt:smiles,zinc_id/substance.features%20contains%20202,
3. http://zincapi.ucsf.bkslab.org/v1/substances/txt:smiles,zinc_id/substance.features%20contains%20203,
 
&substance.purchasability >20 =20, =10, >1.
 
 
 
== NEW TABLE 8 ==
 
chemical warheads and the genes they hit as a function of affinity.
 
http://zincapi.ucsf.bkslab.org/v1/activities/txt:target.gene.name,substance.smiles,substance.zinc_id,substance.purchasability/activity.affinitynm ge 7&substance.structure%20contains%20cC(=O)[OD1]?count=all
 
== Table 8B ==
 
http://zincapi.ucsf.bkslab.org/v1/substances/txt:smiles,zinc_id/substance.features%20contains%20211,
http://zincapi.ucsf.bkslab.org/v1/substances/txt:smiles,zinc_id/substance.features%20contains%20212,
http://zincapi.ucsf.bkslab.org/v1/substances/txt:smiles,zinc_id/substance.features%20contains%20213,
&substance.purchasability >20 =20, =10, >1.
 
 
 
 
http://zincapi.ucsf.bkslab.org/v1/substances/txt:smiles,zinc_id,tanimoto_similarity/gene.name%20eq%20DRD2&ecfp4.data%20similarto%20c1cc2c(cc1O)[C@H](CC2)Cc3c[nH]cn3%20within%200.39?count=all
 
== Figure 1 ==
Drawn. probably to delete.
 
== Figure 2 ==
 
Non-purch final:
psql -h samekh -U test zinc15 -c "select count(distinct(n.sub_id_fk)) as num_compds, g.name as gene_name from gene g, annotation a, note n where g.gene_id = a.gene_fk and a.anno_id = n.anno_id_fk and n.affinitynm >= 5 and g.organism_fk = 1 group by g.name " > 1-10um.txt
 
Purch final:
psql -h samekh -U test zinc15 -c "select count(distinct(n.sub_id_fk)) as num_compds, g.name as gene_name from gene g, annotation a, note n, catalog_item ci, catalog c  where c.cat_id=ci.cat_id_fk and ci.sub_id_fk = n.sub_id_fk and g.gene_id = a.gene_fk and a.anno_id = n.anno_id_fk and n.affinitynm >= 5 and g.organism_fk = 2 and c.purchasable > 9  group by g.name" > 2-10um-purch.txt
 
Unknown
http://api.docking.org/v1/activities/txt:target.gene.name,sub_id_fk,affinitynm,substance.best_purchasbility
 
New non-purch
select count(distinct(n.sub_id_fk)) as num_compds, g.name as gene_name from gene g, annotation a, note n where g.gene_id = a.gene_fk and a.anno_id = n.anno_id_fk and n.affinitynm >= 6 and g.organism_fk = 1 group by g.name; (by organism x 4)
 
Purch:
select count(distinct(n.sub_id_fk)) as num_compds, g.name as gene_name from gene g, annotation a, note n, catalog_item ci, catalog c  where c.cat_id=ci.cat_id_fk and ci.sub_id_fk = n.sub_id_fk and g.gene_id = a.gene_fk and a.anno_id = n.anno_id_fk and n.affinitynm >= 8 and g.organism_fk = 2 and c.purchasable > 9  group by g.name  limit 10;
 
== Figure 3 ==
 
 
 
 
 
 
== Molecular features ==
http://zincapi.ucsf.bkslab.org/v1/substances/txt:smiles,zinc_id/structure contains
 
here another
http://zincapi.ucsf.bkslab.org/v1/substances/txt:smiles,zinc_id,best_purchasable/substance.features%20contains%20201,&catalog.purchasable gt 9?count=all. 
 
and another
http://zincapi.ucsf.bkslab.org/v1/substances/txt:smiles,zinc_id,best_purchasable/substance.features%20contains%20216,&catalog.purchasable gt 9?count=all. 
 
available features
http://zincapi.ucsf.bkslab.org/v1/features/txt:feature_id%2Cdescription%2Crecipe/. (supporting information).   
 
another one
http://zincapi.ucsf.bkslab.org/v1/substances/txt:smiles,zinc_id,tanimoto_similarity/substance.features%20contains%20201,&ecfp4.data%20similarto%20CC(=O)Oc1ccccc1C(=O)O%20within%20.5%20using%20tanitmoto 
 
 
and another:
http://zincapi.ucsf.bkslab.org/v1/substances/txt:smiles,zinc_id,tanimoto_similarity/substance.features%20contains%20201,&ecfp4.data%20similarto%20CC(=O)Oc1ccccc1C(=O)O%20within%20.5?count=all. 
 
and another
http://zincapi.ucsf.bkslab.org/v1/substances/txt:smiles,zinc_id,tanimoto_similarity/substance.features%20contains%20213,&ecfp4.data%20similarto%20CC(=O)Oc1ccccc1C(=O)O%20within%20.5?count=all
 
 
 
 
 
For instance, to look up the drug aripiprazole by its InChI use
zinc15.docking.org/substances?inchi=InChI=1S/C23H27Cl2N3O2/c24-19-4-3-5-21(23(19)25)28-13-11-27(12-14-28)10-1-2-15-30-18-8-6-17-7-9-22(29)26-20(17)16-18/h3-6,8,16H,1-2,7,9-15H2,(H,26,29).
 
To look it (aripiprazole) up by its InChIkey, use
zinc15.docking.org/substances?inchikey=CEUORZQYGODEFX-UHFFFAOYSA-N
 
To look up molecules that share the same molecular framework of aripiprazole, use
zinc15.docking.org/substances?inchikey=CEUORZQYGODEFX%
 
Whereas InChI and InChIkeys are increasingly widely available, an InChI to SMILES translator is available to help facilitate the transition at:
zinc15.docking.org/actions/translate
 
 
= Actions =
 
Translate
zinc15.docking.org/actions/translate
 
Nearest Metabolite
zinc15.docking.org/actions/translate
 
Build dockable library
zinc15.docking.org/actions/build-library
 
One-step reactions
zinc15.docking.org/actions/reaction
 
== orphan ==
 
 
zinc15.docking.org/substances.txt:smiles,zinc_id,tanimoto_similarity?
catalog.purchasable%20gt%209&ecfp4.data%20similarto%20CC(=O)Oc1ccccc1C(=O)O%20within%20.5?count=all
 
 
= Website Main entry points =
 
== Browse all compounds in ZINC ==
http://zinc15.docking.org/substances
Variant 1: all in-stock compounds, as SMILES
http://zinc15.docking.org/substances.smi/in-stock
Variant 2: all biogenic building blocks sold by Sigma Aldrich, as an Excel spreadsheet
http://zinc15.docking.org/substances.xlsx?catalog.name=sialbb&catalog.np=1
 
== Browse all vendors in ZINC ==
http://zinc15.docking.org/catalogs
Variant 1:
http://zinc15.docking.org/catalogs
Variant 2:
http://zinc15.docking.org/catalogs
 
== Browse all genes in ZINC ==
http://zinc15.docking.org/catalogs
Variant 1: eukaryotic genes
http://zinc15.docking.org/catalogs?organism.name=Eukaryotic
Variant 2: genes for eukaryotic transporters
http://zinc15.docking.org/catalogs?major_class.name='transporter'&organism.type=E
 
== Browse all target classes in ZINC ==
http://zinc15.docking.org/target_classes
Variant 1: eukaryotic genes
http://zinc15.docking.org/catalogs?organism.name=Eukaryotic
Variant 2: genes for eukaryotic transporters
http://zinc15.docking.org/catalogs?major_class.name='transporter'&organism.type=E
 
 
== List options ==
Wait, what are the available major classes?
  http://zinc15.docking.org/majorclasses
And the available organism types?
http://zinc15.docking.org/organisms
 
Back to [[Webapi]]
[[Category:ZINC15]]
[[Category:ZINC15]]
[[Category:Idioms]]

Latest revision as of 17:34, 17 August 2017

Introduction

Here are examples of what you can do with ZINC15, organized by ZINC15:Levels.

Public Access

query ZINC using api

time wget --user gpcr --password xtal -O - "http://zinc15.docking.org/substances.txt:smiles,zinc_id,purchasability?
purchasability:gt=10&mwt:le=350&mwt:gt=50&logp:le=3.5&structure.num_rotatable_bonds:le=7&structure:contains=[C;D1]%3D[CD3]C(%3DO)OC&count=all" | tee 18.txt | cat -n 


Private access

These require ssh access or a private copy of ZINC