v1
latestOpenAPI 3.0.22026-07-17171545.4 KBGet Plot Data
Get data for all MMPs associated with specific transform(s) or variable fragment(s).
Before calling this endpoint, first obtain output from /aggregate_transforms.
As input for this endpoint, the necessary ids for the transforms are provided by /aggregate_transforms. The matcher frontend uses this data to generate a scatterplot, e.g. change in property A vs. change in property B, where each point is an MMP belonging to specified transform(s).
Body Parameters:
- query_id: Number returned by /start_query endpoint to run the query of interest
- aggregation_type: "individual_transforms" or "group_by_fragment": use the same value that was input to the /aggregate_transforms endpoint. see the description provided with /aggregate_transforms endpoint. This parameter affects the ID paradigm used for organizing groups of MMPs ("ids" parameter below)
- grouped_by_environment: false or true: use the value returned by the /aggregate_transforms endpoint.
- ids: list of ids for transforms or fragments: the format of the id depends on aggregation_type and grouped_by_environment:
- if aggregation_type = "individual_transforms" and grouped_by_environment = false, then each id is an integer rule_id returned by /aggregate_transforms
- if aggregation_type = "individual_transforms" and grouped_by_environment = true, then each id is a string with the form: from_smiles_env + "_" + to_smiles_env, where from_smiles_env and to_smiles_env are values returned by /aggregate_transforms
- if aggregation_type = "group_by_fragment" and grouped_by_environment = false, then each id is an integer rule_id, from the rule_id_array (all rule_id associated with a fragment), returned by /aggregate_transforms
- if aggregation_type = "group_by_fragment" and grouped_by_environment = true, then each id is a string of a variable fragment plus its environment: to_smiles_env, returned by /aggregate_transforms
- range_filters: OPTIONAL list of range_filter objects, please refer to the documentation for range_filters under /aggregate_transforms endpoint
x_data and y_data: This is just plain data about the MMPs. The reason we are calling the data "x_data" and "y_data" is because this endpoint was originally designed to get data for 2d graphs. This just means that you can get two types of data for MMPs with each call to this endpoint. x_data and y_data arguments can be identical.
x_data and y_data are JSON objects with the following parameters:
- property_name: This property_name should match one of the property_names that was passed in the previous call to /aggregate_transforms.
- change_type: "fold_change", "delta" are two of the options, which respectively are B / A and B - A, where B is the property value of the RHS compound of the MMP, and A is the property value of the LHS compound of the MMP. Additional options (which do not actually represent changes in properties from one MMP to another) are "A" and "B", for the LHS and RHS compound property values, respectively, and "average", the average of A and B.
- base: OPTIONAL: see description for base in /aggregate_transforms
- units: OPTIONAL: see description for units in /aggregate_transforms
Returns JSON with items:
- column_headers: Array of following strings (details about what these labels refer to is provided):
- "from_construct_id": id for the left-hand-side compound in the MMP (more technically, id for the data structure that ties the compound to its variable/constant fragments)
- "to_construct_id": id for the right-hand-side compound in the MMP
- "rule_id": id for the transform that defines the difference between the two compounds in the MMP
- Depending on the above input parameters "aggregation_type" and "grouped_by_environment", additional ids associated with such descriptors could be included
- name for x_axis generated based on choice of property_name and change_type
- name for y_axis generated based on choice of property_name and change_type
- rows: array of arrays (i.e., rows) with elements matching the above column headers, one row per MMP
Request body
Response
Successful Response