ZINC15:Syntax: Difference between revisions

From DISI
Jump to navigation Jump to search
(asdf)
(asdf)
Line 8: Line 8:


* host = zinc15.docking.org
* host = zinc15.docking.org
* resource is one of the 15 resources in the table below.
* resource is one of the 15 [[ZINC15:Resources]]
* format is one of the 12 formats in the formats table below. If omitted, a web page is requested.
* format is one of the 12 formats in the formats table below. If omitted, a web page is requested.
* columns is one or more of the columns in the columns table below. Not all columns make sense in all resource contexts.  Examples are provided. There are sensible defaults for each resource, so the column specification may be omitted.
* columns is one or more of the columns in the columns table below. Not all columns make sense in all resource contexts.  Examples are provided. There are sensible defaults for each resource, so the column specification may be omitted.
Line 15: Line 15:
* resource constraints is optionally one or more of those in the resource-constraints table, below.
* resource constraints is optionally one or more of those in the resource-constraints table, below.


= Resources =
A resource is the type of object you are asking for.  Each ZINC URL specifies only one of 15 available resources.  Resources are always plurals, indicating that the result is always a selection from among the rows in that resource. The supported reference-tables are:
{| class="wikitable"
|-
! table name !! Description !! Notes/Links
|-
|  substances || substance table || notes about substance table
|-
| catalogs || asdfasdf || sdfsdfdaf
|-
| genes || sdfasfd || sadfasdf
|-
| catalogitems || lala || asdf
|-
| protomers || qwer34 || seradsf
|-
| targets || asdfasdf || asdfasdf sa
|-
| activities || sadfasfsd || asdfasfd
|-
| purchasability ||asdf asdf || asdfasfd sadf
|-
| representatives ||asdf asdf || asdfasfd sadf
|-
| clusters ||asdf asdf || asdfasfd sadf
|-
| bioactivities ||asdf asdf || asdfasfd sadf
|-
| majorclasses ||asdf asdf || asdfasfd sadf
|-
| targetclasses ||asdf asdf || asdfasfd sadf
|-
| organisms ||asdf asdf || asdfasfd sadf
|-
| modeltypes ||asdf asdf || asdfasfd sadf
|-
| structures ||asdf asdf || asdfasfd sadf
|-
| traits ||asdf asdf || asdfasfd sadf
|-
| tools ||asdf asdf || asdfasfd sadf
|-
| ecfp4s  || lala || fingerprints
|}
Historical note:  In ZINC 12, the reference-table was always substances, and thus the result of any query was always a set of molecules. A few reports such as vendor and target listings were available via the webpages, but were not supported by the API.  This is a substantial change that appeared first in ZINC 15.


= Format =
= Format =

Revision as of 20:53, 4 March 2015

The general form of a ZINC 15 api request is

http[s]://host/resource[.format[:columns][/variant][?page-view-controls | resource-constraints]

Where items in \[ square brackets \] are optional.

  • host = zinc15.docking.org
  • resource is one of the 15 ZINC15:Resources
  • format is one of the 12 formats in the formats table below. If omitted, a web page is requested.
  • columns is one or more of the columns in the columns table below. Not all columns make sense in all resource contexts. Examples are provided. There are sensible defaults for each resource, so the column specification may be omitted.
  • variant is optionally one or more of the variants in the variants table below
  • page-view-controls is optionally one or more of those listed in the page-view-controls table, below.
  • resource constraints is optionally one or more of those in the resource-constraints table, below.


Format

We support the following formats

format Description options/links
json substance table notes about substance table
txt lala lala
csv lala asdf
xls asdfasdf sdfsdfdaf
tsv qwer34 seradsf
xml sdfasfd sadfasdf


Columns

The result contains the specified columns in the output. If the column is in the reference-table, it is specified without a table specfification, otherwise, the column specification must be of the form table.item.

The following items are supported in each of the tables.


table name Description Notes/Links
substances substance table notes about substance table
ecfp4s lala lala
catalogitems lala asdf
catalogs asdfasdf sdfsdfdaf
protomers qwer34 seradsf
genes sdfasfd sadfasdf
targets asdfasdf asdfasdf sa
activities sadfasfsd asdfasfd
organisms asdf asdf asdfasfd sadf


Objects from among these may be specified as part of a query_specification.


table name Description Notes/Links
substances sub_id, structure, inchikey, up_date, logp, tpsa, hbd, hba notes about substance table
structure mwt, logp, tpsa, hba, hbd, num_atoms, num_heavy_atoms, rotatable_bonds, num_hetero_atoms, num_rings, inchi lala
protomers prot_id, sub_id_fk, desolv_apol, desolv_pol, net_charge asdf
catalogs cat_id, name, short_name, purchasable, free, version, updated, bb, np, drug sdfsdfdaf
catalogitems sub_id_fk, cat_id_fk, supplier_code, depleted seradsf
genes short_name sadfasdf
targets swissprot, uniprot, target, gene, affinity asdfasdf sa
activities affinitynM, target, gene, organism asdfasfd
organisms asdf asdf asdfasfd sadf


Variants

We support the following variants

format Description options/links
page=x substance table notes about substance table
perpage=y lala lala
count=all lala asdf
distinct asdfasdf sdfsdfdaf
sort-by qwer34 seradsf
xml sdfasfd sadfasdf


Format

We support the following resource constraints

format Description options/links
resource.attribute:operator substance table notes about substance table
blah lala lala
blah lala asdf
xls asdfasdf sdfsdfdaf
tsv qwer34 seradsf
xml sdfasfd sadfasdf


Query operators

operator Description synonyms
@> lala contains
<@ lala contained in
= equals eq
< less than lt
> greater than gt
<= less than or equal le
>= greater than or equal ge
between sadfasfsd asdfasfd
like, is, not , startswith, endswith, similar to asdf asdf asdfasfd sadf

NP, Drug and BB

quality values Notes/Links
NP 0=unknown, 1=biogenic, 2=metabolite, 3=endogenous human metabolite lala
Drug 0=unknown, 1=annotated catalog, 2=bioactive, 4=bioactive in vitro < 1uM, 5=bioactive in cells <1uM, 6=in man, 8=world drug, 10=fda approved lala
BB f=not bb, t=bb asdf

examples

http://zincapi.ucsf.bkslab.org/v1/substances/txt:smiles,zinc_id,tanimoto_similarity/catalog.purchasable%20gt%209&ecfp4.data%20similarto%20CC(=O)Oc1ccccc1C(=O)O%20within%20.5?count=all