This is Part 3 of the tutorial Predictive modeling with Bioclipse-R
Predictive modeling with Bioclipse-R - Part 3

Virtual screening and mutagenicity prediciton

In this step we screen DrugBank (Knox, C. et al., 2011) against the growth inhibition model and mutagenicity model, and rank compounds based on their growth inhibition on the U251 cell line.

Prerequisites

This step requires a Bioclipse version running with the models developed in Step 1 - Cancer cell line (U251) growth inhibition modeling and Step 2 - Ames mutagenicity modeling.

Verify that you have the models installed by typing ds.getTests() in the Javascript Console, and verify that you have the models ames.hansen.r and screen.u251 listed.

You can also open up the Decision Support view, and verify that the models are listed like below:


1. Virtual screening of DrugBank

Create a project named drugbank. Download the SDF for the approved drugs approved.sdf, and drag or copy the file into the project.

Run the virtual screening using the following script in Bioclipse Scripting Language (BSL) (download script vscreen.js) (time to complete - ~55 minutes)*:

//======================
//Define properties
molfile="/drugbank/approved.sdf";
outFile="/drugbank/approved-res-sortInhib.sdf";
sortprop="growth inhibition"
 
//The models to run (use 'ds.getTests()' in Javascript Console to see available models)
screenmodel="screen.u251";  
amesmodel="ames.hansen.r";
//======================
 
//Read molecules from file
iterator=molTable.createSDFIndex(molfile).iterator()
 
toSaveMols=cdk.createMoleculeList();
 
//Loop over all mols, predict, and store in sorted list
i = 1;
while (iterator.hasNext()) {
    mol=iterator.next();
    
    //Do predictions
    screenres = ds.runTest(screenmodel, mol).get(0);
    mutres = ds.runTest(amesmodel, mol).get(0);
 
    //Save properties and add in sorted list
    if (screenres.getClassification()!=5 && mutres.getClassification()!=5) { //5 means error
        js.print("Molecule " + i + ":    SCREEN=" + screenres.getValue()
        + "    MUT=" + mutres.getValue() +  "\n");
        mol.setProperty("mutagenicity", mutres.getValue());
        mol.setProperty("growth inhibition", screenres.getValue());
 
        sval=mol.getProperty(sortprop,null); //Sort on this property
         
        added=false;
        for (j=0; j<toSaveMols.size();j++){
            smol=toSaveMols.get(j);
            esval=smol.getProperty(sortprop,null);
            diff=esval-sval;
            if (diff<0){
                toSaveMols.add(j,mol);
                added=true;
                break;
            }
        }
         
        if (added==false)
            toSaveMols.add(mol);
             
    }else{
            js.print("Molecule " + i + ": ** Error **\n");
    }
i++;
}
 
//Save sorted mols to file
cdk.saveSDFile(outFile,toSaveMols);

We can inspect the results by double-clicking on the result-file approved-res-sortInhib.sdf.

We can create an HTML page of the results with links to drugbank using the following BSL script (download script createResultTable.js) (time to complete - less then 1 minute)*:

//======================
//Define properties
molfile="/drugbank/approved-res-sortInhib.sdf";
resultfile="/drugbank/approved.html";
//======================

//Read molecules into a list
mols=cdk.loadMolecules(molfile);

//Create HTML page
page = "<html><head /><body>\n<table frame=\"border\">";
header = "<tr bgcolor=#bbb><td>Drugbank ID</td><td>Growth inhibition</td><td>Ames mutagenicity</td><td>"
+ "Generic Name</td><td>Brands</td><td>Synonyms</td></tr>\n";

page = page + header;

//Create an HTML row per entry in molecules list
for (i=0; i<mols.size();i++){
	mol    = mols.get(i);
	dbid    = mol.getProperty("DRUGBANK_ID", null);
	genname = mol.getProperty("GENERIC_NAME", null);
	brands  = mol.getProperty("BRANDS", null);
	syns    = mol.getProperty("SYNONYMS", null);

	mutP    = mol.getProperty("mutagenicity", null);
	mut = parseFloat(mutP).toFixed(3);

	inhibP = mol.getProperty("growth inhibition", null);
	inhib  = parseFloat(inhibP).toFixed(3);
	
	if (brands==null) brands="";
	if (syns==null) syns="";
	
	row="<tr><td><a href=\"http://drugbank.ca/drugs/" + dbid + "\">" + dbid + "</a></td><td>" +inhib + "</td><td>" +mut + "</td><td>" 
	+ genname + "</td><td>" + brands + "</td><td>" + syns + "</td></tr>\n";
	
	page=page+row;
}

//End HTML page
page=page+"</table></body></html>";

//Save results to file and open in browser
ui.save(resultfile, page);
js.print("Wrote results file: " + resultfile + "\n");
ui.open(resultfile);


The script produces an HTML file which looks like below (view complete table):

2. Inspect the results in 2D and 3D in Bioclipse



*the timings were obtained using 2.7 GHz Intel Core i7 CPU, 8 GB 1333 MHz DDR3 RAM, Intel HD Graphics 3000 512 MB, Mac OS X Lion 10.7.5


Back to the main tutorial.