Constructor and Description |
---|
KnnResource() |
Modifier and Type | Method and Description |
---|---|
KnnsInfo |
get()
Description of available KNN results.
|
KnnData |
getKnnData(String res)
Knn data.
|
KnnInfo |
getKnnInfo(String res)
Description of a knn result.
|
MoleculePropRange |
getNeighborCounts(KnnRes res)
Stored neighbor count for each record.
|
MoleculePropRange |
getNeighborDissimilarities(KnnRes res,
int k,
String missing)
Dissimilarities of the
k -th most similar neighbors. |
MoleculePropRange |
getNeighborIndices(KnnRes res,
int k,
String missing)
Indices of the
k -th most similar neighbors. |
byte[] |
getNeighborPngOrPlaceholder(KnnRes res,
int queryIndex,
int neighborIndex,
int w,
int h,
String aromatize,
String hydrogenize)
Get molecule image for a specific neighbor in PNG format or a placeholder image for absent molecules.
|
MoleculePropRange |
getNeighborProps(KnnRes res,
int k,
String propname,
String missing)
Additional stored property of the
k -th most similar neighbors for all queries. |
MoleculePropRange |
getQueryIndices(KnnRes res,
String missing)
Indices of the queries.
|
byte[] |
getQueryPngOrPlaceholder(KnnRes res,
int queryIndex,
int w,
int h,
String aromatize,
String hydrogenize)
Get molecule image for a query in PNG format or a placeholder image for absent molecules.
|
SizeInfoDto |
getSizeinfo(KnnRes res,
SizeInfoMethod method)
Experimental endpoint to estimate allocated size.
|
KnnTableLabels |
getTableLabels(KnnRes res,
List<Integer> queries,
List<Integer> neighbors,
String missing)
Get labels to be displayed in a k-NN view table.
|
@GET @Produces(value="application/json") public KnnsInfo get()
@GET @Path(value="{res}") @Produces(value="application/json") public KnnInfo getKnnInfo(@PathParam(value="res") String res)
res
- Knn results name@GET @Path(value="{res}/knndata") @Produces(value="application/json") public KnnData getKnnData(@PathParam(value="res") String res)
res
- Knn results name@GET @Path(value="{res}/queryindices") @Produces(value="application/json") public MoleculePropRange getQueryIndices(@PathParam(value="res") KnnRes res, @QueryParam(value="missing") @DefaultValue(value="????") String missing)
res
- Knn results namemissing
- Missing value marker; not used.@GET @Path(value="{res}/neighborcounts") @Produces(value="application/json") public MoleculePropRange getNeighborCounts(@PathParam(value="res") KnnRes res)
res
- Knn results name@GET @Path(value="{res}/neighbor-png-or-placeholder") @Produces(value="image/png") public byte[] getNeighborPngOrPlaceholder(@PathParam(value="res") KnnRes res, @QueryParam(value="query") int queryIndex, @QueryParam(value="neighbor") int neighborIndex, @QueryParam(value="w") @DefaultValue(value="100") int w, @QueryParam(value="h") @DefaultValue(value="100") int h, @QueryParam(value="aromatize") @DefaultValue(value="source") String aromatize, @QueryParam(value="hydrogenize") @DefaultValue(value="source") String hydrogenize) throws IOException, WuiNotFoundException
MoleculesResource.getPngOrPlaceholder(com.chemaxon.overlap.wui.res.MolsRes, int, int, int, java.lang.String, java.lang.String)
with translation to the actual neighbor target.res
- Knn results namequeryIndex
- Qurery indexneighborIndex
- Neighbor indexw
- Image width in pixelsh
- Image height in pixelsaromatize
- Aromatize options, use source
, aromatize
or dearomatize
hydrogenize
- Hydrogenize options. use source
, hydrogenize
or dehydrogenize
IOException
- Propagated from MolExporter
WuiNotFoundException
@GET @Path(value="{res}/query-png-or-placeholder") @Produces(value="image/png") public byte[] getQueryPngOrPlaceholder(@PathParam(value="res") KnnRes res, @QueryParam(value="query") int queryIndex, @QueryParam(value="w") @DefaultValue(value="100") int w, @QueryParam(value="h") @DefaultValue(value="100") int h, @QueryParam(value="aromatize") @DefaultValue(value="source") String aromatize, @QueryParam(value="hydrogenize") @DefaultValue(value="source") String hydrogenize) throws IOException, WuiNotFoundException
MoleculesResource.getPngOrPlaceholder(com.chemaxon.overlap.wui.res.MolsRes, int, int, int, java.lang.String, java.lang.String)
with translation to the actual query master index.res
- Knn results namequeryIndex
- Qurery index in the knn resulsw
- Image width in pixelsh
- Image height in pixelsaromatize
- Aromatize options, use source
, aromatize
or dearomatize
hydrogenize
- Hydrogenize options. use source
, hydrogenize
or dehydrogenize
IOException
- Propagated from MolExporter
WuiNotFoundException
@GET @Path(value="{res}/neighbors/{k}/indices") @Produces(value="application/json") public MoleculePropRange getNeighborIndices(@PathParam(value="res") KnnRes res, @PathParam(value="k") int k, @QueryParam(value="missing") @DefaultValue(value="????") String missing)
k
-th most similar neighbors.res
- Knn results namek
- Neighbor index (0-based)missing
- Value to use for missing k
-th neighbors.@GET @Path(value="{res}/neighbors/{k}/dissimilarities") @Produces(value="application/json") public MoleculePropRange getNeighborDissimilarities(@PathParam(value="res") KnnRes res, @PathParam(value="k") int k, @QueryParam(value="missing") @DefaultValue(value="????") String missing)
k
-th most similar neighbors.res
- Knn results namek
- Neighbor index (0-based)missing
- Value to use for missing k
-th neighbors.@GET @Path(value="{res}/neighbors/{k}/props/{propname}") @Produces(value="application/json") public MoleculePropRange getNeighborProps(@PathParam(value="res") KnnRes res, @PathParam(value="k") int k, @PathParam(value="propname") String propname, @QueryParam(value="missing") @DefaultValue(value="????") String missing)
k
-th most similar neighbors for all queries.res
- Knn results namek
- Neighbor index (0-based)propname
- Property namemissing
- 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.@POST @Path(value="{res}/table-labels") @Consumes(value="application/x-www-form-urlencoded") @Produces(value="application/json") public KnnTableLabels getTableLabels(@PathParam(value="res") KnnRes res, @FormParam(value="queries[]") List<Integer> queries, @FormParam(value="neighbors[]") List<Integer> neighbors, @QueryParam(value="missing") @DefaultValue(value="????") String missing)
res
- Knn results namequeries
- Query indices in the kNN tableneighbors
- Neighbors to retrievemissing
- Value to use for missing values.@Beta @GET @Produces(value="application/json") @Path(value="{res}/get-sizeinfo") public SizeInfoDto getSizeinfo(@PathParam(value="res") KnnRes res, @QueryParam(value="method") SizeInfoMethod method)
res
- Knn results namemethod
- Size info method to use.