ZINC15:examples: Difference between revisions

From DISI
Jump to navigation Jump to search
(234)
m (asdf)
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{TOCright}}
{{TOCright}}
This continues to be an aspirational document, but we really are working on it!
= Introduction =
 
Here are examples of what you can do with ZINC15, organized by [[ZINC15:Levels]].
Examples organized by public/private and level of difficulty ==
See [[ZINC15:Levels]] for a description of our classification of questions by how easy it is to answer them.
Please see also [[ZINC15:videos]] for discussions of various topics.
Please also see [[ZINC15:examples:screening]]  and  [[ZINC15:examples:resources]] for more examples.


= Public Access =
= Public Access =
== Level 1 questions - easy to answer using webpage ==
* [[ZINC15:examples:public]]
All DRD2 ligands
* [[ZINC15:videos]]  
http://zinc15.docking.org/genes/DRD2/substances.smi
* [[ZINC15:examples:screening]]  
 
All available genes
http://zinc15.docking.org/genes.txt
 
How many ChEMBL targets have at least one purchasable compound for sale?
zinc15.docking.org/activities:target.uniprot?catalog.purchasable .....
 
How many ligands for class F GPCRs are for sale?
zinc15.docking.org/substances.txt:smiles,sub_id,gene.name?subclass=name=GPCR-F&substance.purchasability:ge=10&count=all
 
What is the nearest metabolite or drug to my compound?
zinc15.docking.org/substances.txt?ecfp4.data:tanimoto,0.5=<url-encoded-smiles>
thus for ZINC27,
zinc15.docking.org/substances.txt?ecfp4.data:tanimoto,0.5=N[C@@H](CCc1ccc(N(CCCl)CCCl)cc1)C(=O)O
 
Which FDA approved drugs are also metabolites?
zinc15.docking.org/substances?substance.features:contains=211,202&count=all
 
Which compounds are in Drugbank but not in ChEMBL Drugstore?
 
Which genes have a ligand reported that binds at 10nM concentration or better?
zinc15.docking.org/activities.txt:gene.name?activities.affinitynm:ge=8&distinct=gene.name&count=all
 
Which targets do hydroxamic acids bind to?
zinc15.docking.org/targets.txt:target.uniprot?structure.contains=C(=O)[ND2][OD1]&distinct=target.uniprot&count=all
 
Which vendors sell the most biogenic compounds (natural products), and what are those compounds?
zinc15.docking.org/catitms.txt:catalog.short_name,catitm.supplier_code,substance.zinc_id,substance.smiles?catalog.np=1&count=all
 
How many primary amines as for sale in preparative quantitites?
zinc15.docking.org/substances.txt?substance.structure:contains=[ND1]&catalog.bb=True&count=all
 
== Level 2 questions - edit URL by hand ==
This is usually because we have not yet gotten around to writing a graphical interface for this class of questions.
 
Description
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
 
How many primary amines are available for sale in preparative quantities?
URL="zinc15.docking.org:8015/substances.txt?substance.structure:contains=[ND1]&catalog.bb=True&substance.purchasability:gt=9&count=all"
wget -o log -O amines.smi "$URL"
wc -l amines.smi
answer: xxxx
 
== Table 6 ==
 
1 compounds:
http://zinc15.docking.org/substances.txt:smiles,zinc_id?structure-contains=CS(=O)(=O)[ND1]&substance.purchasability=for-sale
 
genes: 2
http://zinc15.docking.org/substances.txt:smiles,zinc_id?substance.purchasability=for-sale&structure-contains=C(=O)[ND2][OD1]
 
3
http://zinc15.docking.org/substances.txt:smiles,zinc_id?purchasability=for-sale&structure-contains=cC(=O)[OD1]
 
4
zinc15.docking.org/v1/substances.txt:smiles,zinc_id?purchasability=for-sale&structure-contains=CC(=O)[OD1]
 
5.
zinc15.docking.org/substances.txt:smiles,zinc_id?purchasability=for-sale&structure-contains=[SH]&count=all
 
 
6.  Primary amines.
 
== Table 7 - What genes do warheads hit? ==
compounds:
1
zinc15.docking.org/substances.txt:smiles,zinc_id?structure-contains=CS(=O)(=O)[ND1]&purchasability=for-sale
2
zinc15.docking.org/substances.txt:smiles,zinc_id?purchasability=for-sale&structure-contains=C(=O)[ND2][OD1]
 
3
zinc15.docking.org/substances.txt:smiles,zinc_id?purchasability=for-sale&structure-contains=cC(=O)
 
4
http://zincapi.ucsf.bkslab.org/v1/substances/txt:smiles,zinc_id/substance.purchasability%20gt%209&structure%20contains%20CC(=O)[OD1]
5.
 
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.
 
== Level 3 questions - not possible in one line - requires python ==
Using a bit of python can dramatically extend the power of the ZINC website.
 
= Private access required =
 
== Level 4 - privileged access ==
Ask us if you require this level of access to ZINC.
 
== Level 5 - command line ZINC shell ==
 
== Level 6 - SQL ==
 
How to calculate results from the ZINC15 2015 paper:
 
Table 2 - Genes, Uniprot codes and annotated compounds by affinity bin ==
 
* * 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
 
* * 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
 
== Level 7 - Python+SQL ==
 
== Level 8 - Questions we cannot answer (yet) ==
 
 
 
== 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.
 
== 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 ==
 
 
== 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
 
 
http://zinc15.docking.org/substances/subsets/fda+biogenic/
 
http://zinc15.docking.org/subclasses/phosphatase/substances/subsets/biogenic/
 
http://zinc15.docking.org/substances/subsets/biogenic/?genes-any-sub_class_name=GPCR-A&predictions-any-major_class_name=ion%20channel
 
http://zinc15.docking.org/substances/subsets/biogenic/?genes-any-sub_class_name=GPCR-A&genes-any-major_class_name=ion%20channel
 
http://zinc15.docking.org/substances/subsets/biogenic/having/rings/subsets/triple/
 
http://zinc15.docking.org/genes/MCHR2/targets/
http://zinc15.docking.org/substances/subsets/world+natural-products/
http://zinc15.docking.org/genes/having/no-activities/subsets/1uM/?related.purchasability=for-sale&num_substances-ge=1
http://zinc15.docking.org/genes/having/no-activities/subsets/1uM/?related.purchasability=for-sale&num_substances-ge=1
 
http://zinc15.docking.org/genes/APLNR/substances/subsets/for-sale/table.html
 
http://zinc15.docking.org/genes/APLNR/substances/subsets/for-sale/
 
http://zinc15.docking.org/genes/subsets/gpcra/having/no-activities/subsets/100nM/?num_substances-ge=1
 
http://zinc15.docking.org/genes/subsets/gpcra/having/no-activities/subsets/1uM/
 
http://zinc15.docking.org/genes/subsets/gpcra/having/activities/?related.affinity-lt=6&num_purchasable=1&num_substances-gt=0
 


5HT ligands, colored by endogenous ligand
query ZINC using api
  http://zinc15.docking.org/genes/HTR1D/substances/?highlight=5-HT&ecfp4_fp-tanimoto=NCCc1c%5BnH%5Dc2ccc%28O%29cc12
  time wget --user gpcr --password xtal -O - "http://zinc15.docking.org/substances.txt:smiles,zinc_id,purchasability?
sorted by affinity....
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
http://zinc15.docking.org/genes/HTR1D/activities/?highlight=5-HT&substance.ecfp4_fp-tanimoto=NCCc1c%5BnH%5Dc2ccc%28O%29cc12


alter user zincfree set search_path = "$user", free, public;


http://zinc15.docking.org/substances/subsets/world/having/no-genes+no-predictions/
= Private access =
http://zinc15.docking.org/substances/subsets/world/having/no-genes+predictions/
These require ssh access or a private copy of ZINC
http://zinc15.docking.org/substances/subsets/world/having/no-genes/
* [[ZINC15:examples:private]]
http://zinc15.docking.org/rings/indole/substances/subsets/world/having/no-genes/
http://zinc15.docking.org/substances/subsets/world/having/patterns/subsets/pains/?sort=no
http://zinc15.docking.org/substances/subsets/aggregators/having/trials/
http://zinc15.docking.org/substances/subsets/endogenous/having/patterns/subsets/pains/?sort=no (lots of incorrectly curated)


[[Category:Tutorials]]
[[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