Workflow templates
Eight complete, runnable workflows ship with the program, each with the data set it was written for.
A template is a workflow that is ready to run: every node is connected and every parameter set to a value chosen for the task. Templates are the quickest way to see a complete analysis, and a sound starting point for your own: open one on your data, inspect what it does, change what you need and save it under your own name.
The gallery
Workflow > Template gallery lists the templates by category. Each card gives the name, the number of nodes and the sample data set; resting the pointer on a card shows the template's full description. Search templates filters by name, description, category and identifier. Open (or a click on the card) asks which data the template runs on. The same templates are listed in the submenu Workflow > Templates, which goes straight to that question.
Choosing the data
Nothing is selected in the Open template dialog: Open stays unavailable until you choose one of the open datasets, a File (typed or found with Browse), or Sample data, the shipped set named underneath.
With your own data, the reader of the template is pointed at your file and its format detected from the file. Where your file has no column under the name the template uses, the structure, name and activity columns detected in your file are set on the reader and dataset nodes, and the notification lists them (Check the columns: ...) so you can confirm them in the inspector before the first run. An open dataset that has been edited is passed as a snapshot of the table as you see it. A template opens on the canvas without running; press Run when it is set up.
The sample data sets
| Sample | File | Compounds | Content |
|---|---|---|---|
| Acetylcholinesterase inhibitors (pIC50) | data/flow/ache_pic50.csv | 429 | Human acetylcholinesterase (ChEMBL CHEMBL220), IC50 converted to pIC50, replicates pooled by median, 43 publications. |
| hERG blockers / non-blockers | data/flow/herg_class.csv | 554 | hERG (ChEMBL CHEMBL240); blocker when pIC50 is at least 6 (IC50 of 1 uM or less). The continuous pIC50 column is kept so the cut can be moved. 186 blockers, 368 non-blockers. |
| Corticosteroid-binding-globulin steroids | data/qsar3d/steroids.csv | 31 | The classical 3D-QSAR steroid benchmark of Cramer, Patterson and Bunce (J. Am. Chem. Soc. 110:5959, 1988), with the literature's training and test division in the set column. |
| Stereoisomer pairs with measured activities | data/desc/chirality_cliffs.csv | 34 | Curated stereoisomer pairs from ChEMBL with same-assay provenance (see Chirality and activity cliffs). |
The templates
The figures quoted are those of the template as shipped, run on its sample data with its own seeds; on other data they will differ. The templates use moderate permutation counts so that they finish in seconds to minutes; raise them for a production model.
2D-QSAR (PLS) OECD workflow
The standard regression workflow, 8 nodes: Read molecules, Standardize structures, Compute descriptors (the classical 2D families with functional-group counts and the atom-pair, torsion and ECFP4 count fingerprints of 1024 bins), Build dataset (pIC50, duplicates merged), Training / test split (activity-stratified, 25 % test), Train model, Validate model and Report. The model is PLS with the number of components chosen by cross-validation (up to 10); mean imputation, Tukey outlier limits, a correlation filter at 0.95 and autoscaling are fitted inside the model, so cross-validation and Y-randomization refit them in every resample and the saved model predicts raw descriptors. Validation is 5-fold cross-validation repeated 3 times, Y-randomization and the applicability domain by leverage and k-nearest neighbours.
On the AChE sample: 3976 descriptor columns, 5 PLS components, R2 0.8491, Q2 0.5565, Q2F1 0.5019 and CCC 0.6827; 12 of 19 literature acceptance criteria fail, which the report states rather than hides. Use this template for any measured potency or property series; its model, descriptors and validation are those of the default recipe of the 2D-QSAR wizard.
Automatic model search
9 nodes. The series is curated, described and assembled as above; a stratified 20 % test set is set aside first; Preprocess descriptors imputes and removes constant and correlated columns; the Automatic model search node searches several model families and descriptor subsets over 3 internal training/test splits of the remaining compounds, tuning hyper-parameters inside each split, and ranks the candidates by a composite score. The winner is then scored once by Validate model on the test set the search never saw, and the report holds the model search leaderboard. On the AChE sample, 18 candidates are compared; the best is a random forest of 500 trees on the correlation-filtered descriptors (composite score 0.361), with Q2F1 0.473 and CCC 0.615 on the 86 held-out compounds, in about 30 seconds on a 28-thread workstation. Use it when you do not know which model family suits the data; the composite score is a GeinQSAR definition. See Comparing models.
2D-QSAR classification (blocker / non-blocker)
8 nodes, the classification counterpart of the PLS template: the same descriptors in a categorical dataset, a class-stratified 25 % test set, a random forest of 500 trees with balanced class weights and mean imputation inside the model, and Validate classifier with 5-fold stratified cross-validation repeated 3 times, the confusion matrix, balanced accuracy, the Matthews correlation coefficient, the ROC curve with a DeLong interval and a label-permutation test with 25 permutations. On the hERG sample the cross-validated MCC is 0.495 and the balanced accuracy 0.721. Use it for any active/inactive or toxic/non-toxic label. See Classification models.
KEFRA 3D-QSAR
9 nodes: Read molecules, Standardize structures, Generate 3D structure (with optimised polar hydrogens), Generate conformers (ensemble size from the number of rotatable bonds), Assign partial charges (Gasteiger-Marsili), Align in 3D (on the common core, with the best-fitting conformer of each molecule), KEFRA model (the lattice-free kernel model, its widths and regularisation chosen by nested cross-validation), Contour maps and Report. The training and test division is read from the set column. Every prediction of the model carries a predictive standard deviation and an applicability domain. See The 3D-QSAR wizard.
Atom-based QSAR
The same preparation and alignment with the atom-based cubes instead of KEFRA: atom-class occupancy of the lattice (the volume of every cube filled by atoms of each class: donor, hydrophobic, negative, positive, electron-withdrawing, other), modelled by PLS with cross-validated component selection. On the steroids: 4 components, r2 0.957, q2 0.794, r2pred 0.469. The cubes read directly as "an atom of this class here raises or lowers the activity". See Contour maps and atom cubes.
Chirality cliff analysis
5 nodes: Read stereoisomer pair set (same-assay rows only), Perceive stereochemistry, Chirality cliff analysis (cliff threshold 1.0, the provenance column as the same-assay mark), Write CSV of the pairs and Report. On the shipped pairs it finds 19 stereoisomer pairs and 8 chirality cliffs over 3 constitutions, all invisible to the conventional 2D descriptors. To analyse your own pair table or compound table, use the wizard Chirality > Chirality and activity cliffs, which also offers the activity-cliff analysis.
Virtual screening with model + AD
14 nodes in two branches. The training branch reads the first 340 records of the AChE sample, curates them, computes the Chirality-aware 2D descriptors, builds the dataset, splits off a random 20 %, preprocesses and fits a 3-component PLS model with imputation and autoscaling inside it, and saves the model with Write model. The library branch reads the remaining records, prepares them in exactly the same way, and Predict keeps only the compounds inside the applicability domain; Export predictions writes the ranked hits as CSV and SD file. On the sample, 81 of the 89 library compounds are inside the domain, and their predictions correlate with the measured values with r = 0.65. When you open this template on your own file, only the library reader is pointed at it: the training series stays as shipped, the library is read from its first record, and no activity column is demanded, because a screening library is in general unmeasured. Replace the training branch's reader to screen with your own model; see Predicting new compounds.
LIBQORA library design
Two branches on the AChE sample. One trains the default 2D model on the measured series; the other enumerates a scaffold taken from the actives of that series against the built-in substituent library, filters the products (Lipinski and PAINS), scores every product with the model and its applicability domain, ranks the products by predicted activity and drug-likeness together, and picks a structurally diverse short list. Molecules outside the domain are ranked below every molecule the model can vouch for. See Designing a library and The library dashboard.
Templates on the command line
gqsar-cli templates --verbose lists the templates with their descriptions and sample data, and gqsar-cli templates --write DIR writes them as .gqflow files. The files shipped in data/flow/templates are identical to what that command writes.