Score Queries
Score queries, formed by adding the special SCORE keyword to encoded queries, are used to assign numeric attribute values to one or more compounds. This assignment is usually performed using the Query option on the Add Compound Attributes dialog, which is launched using the menu item Data >> Add Compound Attributes.
The following is an example of a score query:
S+logP > 3.0 SCORE 1
The above query indicates that a score of 1 will be assigned to a compound if its value of S+logP is greater than 3.0.
The following is another example that uses a SMARTS substructure query:
SLQ [#6]C(=O)[O;D1] SCORE 3
This query assigns a score of 3 to compounds containing a carboxylic acid.
When queries are combined using logical operators, the SCORE keyword generally comes after the group of queries, as in the following example:
FUnion > 0.5
AND
FZwitter < 0.5
SCORE 1
In the query above, the score of 1 is assigned to a compound only if it satisfies both of the subqueries ("FUnion > 0.5" and "FZwitter < 0.5").
The following similar example uses the grouping operators BEGINGROUP and ENDGROUP:
BEGINGROUP
SLQ [CX3]=[CX3][CX3]=O
OR
SLQ [CX3]=[CX3][CX2]#N
OR
SLQ [CX3]=[CX3]S(=O)=O
ENDGROUP
SCORE 1
One of the more common uses of score queries is to assign to compounds a score equal to the number of matching subqueries. For example, one could create a list of subqueries representing fragments associated with toxicity, such that a nonzero score would be assigned to each compound containing one or more of the fragments. The following is a simple example of such a query comprised of two subqueries:
QUERYNAME TOX_Score
QUERYNAME TOX_Epoxide
SLQ O1CC1 SCORE 1
QUERYNAME TOX_Aldehyde
SLQ [#6][CH](=O) SCORE 1
There are several things to note in the above example. The first is the keyword QUERYNAME, which is used to assign a name to the overall query (TOX_Score) as well as to each of the two subqueries (TOX_Epoxide and TOX_Aldehyde). The second is that each of the two subqueries has an assigned score value. Finally, note that there is no explicit logical operator between the two subqueries.
The easiest way to use the above query is to place it into a file with the .cqf extension, then load it from the Define attribute query dialog, which is activated using the Data >> Add Compound Attributes >> Query workflow described earlier.
When the above score query is used to assign an attribute value to a compound, an attribute called TOX_Score will be created, and the compound will be assigned the value 1 if it satisfies the TOX_Epoxide subquery, 1 if it satisfies the TOX_Aldehyde subquery, 2 if it satisfies both subqueries and 0 if it satisfies neither.
In addition to the TOX_Score attribute, a second attribute called TOX_Score_Code will be created that will list the names of the subqueries satisfied by the compound. For example, TOX_Score will list both TOX_Epoxide and TOX_Aldehyde for a compound that satisfies both subqueries.
The file called AttributeExamples.cqf, provided as part of the ADMET Predictor distribution, contains examples of score queries that can serve as templates for creating new queries of your own. Additional examples are contained in the distribution files DrugLikeFilters.cqf, ReactiveMetabolites.cqf and ToxAlerts.cqf. Users are encouraged to experiment with these files by loading them using the Data >> Add Compound Attributes >> Query workflow just described.