KNN analysis results JAX-RS resource.
Description of available KNN results.
media type | data type | description |
---|---|---|
application/json | KnnsInfo (JSON) | Available knn results. |
GET /knn-results
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"knns" : [ {
"querycount" : 12345,
"minneighborcount" : 12345,
"maxneighborcount" : 12345,
"allneighborcount" : 12345,
"querymolecules" : {
"size" : 12345,
"time" : 12345,
"description" : "...",
"absentmols" : 12345,
"absentids" : 12345,
"url" : "...",
"name" : "...",
"propnames" : [ "...", "..." ],
"props" : [ { }, { } ]
},
"targetmolecules" : {
"size" : 12345,
"time" : 12345,
"description" : "...",
"absentmols" : 12345,
"absentids" : 12345,
"url" : "...",
"name" : "...",
"propnames" : [ "...", "..." ],
"props" : [ { }, { } ]
},
"context" : "...",
"qmolsurl" : "...",
"tmolsurl" : "...",
"queryindexproj" : "...",
"targetindexproj" : "...",
"self" : true,
"mindissim" : 12345.0,
"maxdissim" : 12345.0,
"minneighborindex" : 12345,
"maxneighborindex" : 12345,
"url" : "...",
"name" : "...",
"time" : 12345
}, {
"querycount" : 12345,
"minneighborcount" : 12345,
"maxneighborcount" : 12345,
"allneighborcount" : 12345,
"querymolecules" : {
"size" : 12345,
"time" : 12345,
"description" : "...",
"absentmols" : 12345,
"absentids" : 12345,
"url" : "...",
"name" : "...",
"propnames" : [ "...", "..." ],
"props" : [ { }, { } ]
},
"targetmolecules" : {
"size" : 12345,
"time" : 12345,
"description" : "...",
"absentmols" : 12345,
"absentids" : 12345,
"url" : "...",
"name" : "...",
"propnames" : [ "...", "..." ],
"props" : [ { }, { } ]
},
"context" : "...",
"qmolsurl" : "...",
"tmolsurl" : "...",
"queryindexproj" : "...",
"targetindexproj" : "...",
"self" : true,
"mindissim" : 12345.0,
"maxdissim" : 12345.0,
"minneighborindex" : 12345,
"maxneighborindex" : 12345,
"url" : "...",
"name" : "...",
"time" : 12345
} ]
}
Description of a knn result.
name | type | description |
---|---|---|
res | path | Knn results name |
media type | data type | description |
---|---|---|
application/json | KnnInfo (JSON) | Description of a knn result. |
GET /knn-results/{res}
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"querycount" : 12345,
"minneighborcount" : 12345,
"maxneighborcount" : 12345,
"allneighborcount" : 12345,
"querymolecules" : {
"size" : 12345,
"time" : 12345,
"description" : "...",
"absentmols" : 12345,
"absentids" : 12345,
"url" : "...",
"name" : "...",
"propnames" : [ "...", "..." ],
"props" : [ {
"name" : "...",
"type" : "...",
"numeric" : true,
"extractor" : "..."
}, {
"name" : "...",
"type" : "...",
"numeric" : true,
"extractor" : "..."
} ]
},
"targetmolecules" : {
"size" : 12345,
"time" : 12345,
"description" : "...",
"absentmols" : 12345,
"absentids" : 12345,
"url" : "...",
"name" : "...",
"propnames" : [ "...", "..." ],
"props" : [ {
"name" : "...",
"type" : "...",
"numeric" : true,
"extractor" : "..."
}, {
"name" : "...",
"type" : "...",
"numeric" : true,
"extractor" : "..."
} ]
},
"context" : "...",
"qmolsurl" : "...",
"tmolsurl" : "...",
"queryindexproj" : "...",
"targetindexproj" : "...",
"self" : true,
"mindissim" : 12345.0,
"maxdissim" : 12345.0,
"minneighborindex" : 12345,
"maxneighborindex" : 12345,
"url" : "...",
"name" : "...",
"time" : 12345
}
Experimental endpoint to estimate allocated size. Please note that this endpoint is under construction, use with caution: execution might fail and execution might have significant memory/cpu impact. The availability/functionality of this endpoint might change in any of the subsequent releases.
name | type | description | constraints |
---|---|---|---|
res | path | Knn results name | |
method | query | Size info method to use. | "CALCULATED" or "JAVAAGENT" |
media type | data type | description |
---|---|---|
application/json | SizeInfoDto (JSON) | Size info description |
GET /knn-results/{res}/get-sizeinfo
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"size" : 12345,
"details" : [ {
"size" : 12345,
"name" : "..."
}, {
"size" : 12345,
"name" : "..."
} ]
}
Knn data.
name | type | description |
---|---|---|
res | path | Knn results name |
media type | data type | description |
---|---|---|
application/json | KnnData (JSON) | Knn data. |
GET /knn-results/{res}/knndata
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"dissimilarities" : [ 12345.0, 12345.0 ],
"targets" : [ 12345, 12345 ],
"queries" : [ 12345, 12345 ],
"querycount" : 12345,
"minneighborcount" : 12345,
"maxneighborcount" : 12345,
"allneighborcount" : 12345,
"querymolecules" : {
"size" : 12345,
"time" : 12345,
"description" : "...",
"absentmols" : 12345,
"absentids" : 12345,
"url" : "...",
"name" : "...",
"propnames" : [ "...", "..." ],
"props" : [ {
"name" : "...",
"type" : "...",
"numeric" : true,
"extractor" : "..."
}, {
"name" : "...",
"type" : "...",
"numeric" : true,
"extractor" : "..."
} ]
},
"targetmolecules" : {
"size" : 12345,
"time" : 12345,
"description" : "...",
"absentmols" : 12345,
"absentids" : 12345,
"url" : "...",
"name" : "...",
"propnames" : [ "...", "..." ],
"props" : [ {
"name" : "...",
"type" : "...",
"numeric" : true,
"extractor" : "..."
}, {
"name" : "...",
"type" : "...",
"numeric" : true,
"extractor" : "..."
} ]
},
"context" : "...",
"qmolsurl" : "...",
"tmolsurl" : "...",
"queryindexproj" : "...",
"targetindexproj" : "...",
"self" : true,
"mindissim" : 12345.0,
"maxdissim" : 12345.0,
"minneighborindex" : 12345,
"maxneighborindex" : 12345,
"url" : "...",
"name" : "...",
"time" : 12345
}
Get molecule image for a specific neighbor in PNG format or a placeholder image for absent molecules. When the given molecule is absent then a placeholder image is generated. This call delegates to the target molecule sets GET MoleculesResource with translation to the actual neighbor target.
name | type | description | default | constraints |
---|---|---|---|---|
res | path | Knn results name | ||
aromatize | query | Aromatize options, use source, aromatize or dearomatize | source | |
h | query | Image height in pixels | 100 | int |
hydrogenize | query | Hydrogenize options. use source, hydrogenize or dehydrogenize | source | |
neighbor | query | Neighbor index | int | |
query | query | Qurery index | int | |
w | query | Image width in pixels | 100 | int |
media type | data type | description |
---|---|---|
image/png | (custom) | Molecule in SDF format with ID set to SDF property "id". |
GET /knn-results/{res}/neighbor-png-or-placeholder
Content-Type: */*
Accept: image/png
...
HTTP/1.1 200 OK
Content-Type: image/png
...
Stored neighbor count for each record.
name | type | description |
---|---|---|
res | path | Knn results name |
media type | data type | description |
---|---|---|
application/json | MoleculePropRange (JSON) | Neighbor count for all queries |
GET /knn-results/{res}/neighborcounts
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"start" : 12345,
"count" : 12345,
"presentcount" : 12345,
"missingcount" : 12345,
"missingvalue" : { },
"values" : [ { }, { } ]
}
Get molecule image for a query in PNG format or a placeholder image for absent molecules. When the given molecule is absent then a placeholder image is generated. This call delegates to the query molecule sets GET MoleculesResource with translation to the actual query master index.
name | type | description | default | constraints |
---|---|---|---|---|
res | path | Knn results name | ||
aromatize | query | Aromatize options, use source, aromatize or dearomatize | source | |
h | query | Image height in pixels | 100 | int |
hydrogenize | query | Hydrogenize options. use source, hydrogenize or dehydrogenize | source | |
query | query | Qurery index in the knn resuls | int | |
w | query | Image width in pixels | 100 | int |
media type | data type | description |
---|---|---|
image/png | (custom) | Molecule in SDF format with ID set to SDF property "id". |
GET /knn-results/{res}/query-png-or-placeholder
Content-Type: */*
Accept: image/png
...
HTTP/1.1 200 OK
Content-Type: image/png
...
Indices of the queries.
name | type | description | default |
---|---|---|---|
res | path | Knn results name | |
missing | query | Missing value marker; not used. | ???? |
media type | data type | description |
---|---|---|
application/json | MoleculePropRange (JSON) | Indices of the specified neighbor for each query |
GET /knn-results/{res}/queryindices
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"start" : 12345,
"count" : 12345,
"presentcount" : 12345,
"missingcount" : 12345,
"missingvalue" : { },
"values" : [ { }, { } ]
}
Get labels to be displayed in a k-NN view table. A typical visualization use case is to display some of the neighbors of some of the queries along with IDs.
name | type | description | default | constraints | multivalued |
---|---|---|---|---|---|
neighbors[] | form | Neighbors to retrieve | int | yes | |
queries[] | form | Query indices in the kNN table | int | yes | |
res | path | Knn results name | no | ||
missing | query | Value to use for missing values. | ???? | no |
media type | data type | description |
---|---|---|
application/json | KnnTableLabels (JSON) | Collected labels |
POST /knn-results/{res}/table-labels
Content-Type: application/x-www-form-urlencoded
Accept: application/json
...
HTTP/1.1 201 Created
Content-Type: application/json
{
"missingvalue" : "...",
"q" : {
"property1" : {
"queryid" : "...",
"queryindex" : 12345,
"querymolindex" : 12345,
"dissimilarities" : {
"property1" : 12345.0,
"property2" : 12345.0
},
"targetids" : {
"property1" : "...",
"property2" : "..."
},
"targetmolindices" : {
"property1" : 12345,
"property2" : 12345
}
},
"property2" : {
"queryid" : "...",
"queryindex" : 12345,
"querymolindex" : 12345,
"dissimilarities" : {
"property1" : 12345.0,
"property2" : 12345.0
},
"targetids" : {
"property1" : "...",
"property2" : "..."
},
"targetmolindices" : {
"property1" : 12345,
"property2" : 12345
}
}
}
}
Dissimilarities of the k
-th most similar neighbors.
name | type | description | default | constraints |
---|---|---|---|---|
k | path | Neighbor index (0-based) | int | |
res | path | Knn results name | ||
missing | query | Value to use for missing k-th neighbors. | ???? |
media type | data type | description |
---|---|---|
application/json | MoleculePropRange (JSON) | Dissimilarities of the specified neighbor for each query |
GET /knn-results/{res}/neighbors/{k}/dissimilarities
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"start" : 12345,
"count" : 12345,
"presentcount" : 12345,
"missingcount" : 12345,
"missingvalue" : { },
"values" : [ { }, { } ]
}
Indices of the k
-th most similar neighbors.
name | type | description | default | constraints |
---|---|---|---|---|
k | path | Neighbor index (0-based) | int | |
res | path | Knn results name | ||
missing | query | Value to use for missing k-th neighbors. | ???? |
media type | data type | description |
---|---|---|
application/json | MoleculePropRange (JSON) | Indices of the specified neighbor for each query |
GET /knn-results/{res}/neighbors/{k}/indices
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"start" : 12345,
"count" : 12345,
"presentcount" : 12345,
"missingcount" : 12345,
"missingvalue" : { },
"values" : [ { }, { } ]
}
Additional stored property of the k
-th most similar neighbors for all queries.
name | type | description | default | constraints |
---|---|---|---|---|
k | path | Neighbor index (0-based) | int | |
propname | path | Property name | ||
res | path | Knn results name | ||
missing | query | Value to use for missing values. Note that a property value is considered missing when the specified neighbor is not stored or when the specified neighbor is stored but its specified property value is not available. | ???? |
media type | data type | description |
---|---|---|
application/json | MoleculePropRange (JSON) | Property for k-th nearest neighbor of all queries |
GET /knn-results/{res}/neighbors/{k}/props/{propname}
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"start" : 12345,
"count" : 12345,
"presentcount" : 12345,
"missingcount" : 12345,
"missingvalue" : { },
"values" : [ { }, { } ]
}