Frequently Asked Questions
- Which is the latest Toxtree version?
- What is the format of Toxtree input files?
- I use Toxtree version 2.5.0. If I try to use a chemical identifier, I receive a message like "failed to retrieve from remote server"?. However, it works, if using chemical names.
- How to specify daily intakes in a batch file,for computation of Kroes TTC?
- How to run Toxtree predictions from (Java) code?
- How to use Toxtree on command line only (headless, without UI) and select specific module?
- Which is the latest Toxtree version?
-
Toxtree 3.1.0 is the latest stable release. The latest development version is ToxTree 3.2.0-SNAPSHOT (Maven repository).
- What is the format of Toxtree input files?
-
The list of supported file formats can be found in the user manual. A brief list of the most common formats follows:
- filename.SDF is Structure Data Format
- filename.CSV is comma delimited text file,with mandatory header row. A column,containing SMILES, should have title "SMILES". The number,titles and order of the columns are arbitrary. Example
NAME,CAS,SMILES Acetic acid,64-19-7,CC(O)=O Acetoin,513-86-0,CC(O)C(C)=O
- filename.TXT is tab delimited text file. A column,containing SMILES, should have title "SMILES". The number,titles and order of the columns are arbitrary.
- I use Toxtree version 2.5.0. If I try to use a chemical identifier, I receive a message like "failed to retrieve from remote server"?. However, it works, if using chemical names.
-
Chemical identifiers are resolved via remote server (if enabled). The remote query may fail to retrieve an identifier for the following reasons:
- The identifier is not found at the server.
- Your computer is behind a firewall, blocking port 8080, and preventing the remote query.
- How to specify daily intakes in a batch file,for computation of Kroes TTC?
-
The amount of daily intake (in microgram/day) can be specified as an additional column / SDfile field, with the name "DailyIntake". The following files are example of the proper formatting (the values are for illustration only):
- How to run Toxtree predictions from (Java) code?
-
- Java standalone example Toxtree and CDK dependencies up to v1.4.11 are available via Maven repository. Examples how to use Apache Maven for Java project management here. More Toxtree examples.
import java.io.FileOutputStream; import java.io.InputStream; import java.io.OutputStream; import org.junit.Test; import org.openscience.cdk.interfaces.IAtomContainer; import org.openscience.cdk.io.iterator.IteratingMDLReader; import org.openscience.cdk.silent.SilentChemObjectBuilder; import toxTree.core.IDecisionResult; import toxTree.tree.cramer.CramerRules; public class ToxTreeAppTest { public static void main(String[] args) { CramerRules rules = new CramerRules(); IDecisionResult result = rules.createDecisionResult(); result.setDecisionMethod(rules); InputStream in = new FileInputStream("myfile.sdf"); IteratingMDLReader reader = new IteratingMDLReader(in,SilentChemObjectBuilder.getInstance()); OutputStream out = new FileOutputStream("result.sdf"); MDLWriter writer = new MDLWriter(out); while (reader.hasNext()) { IAtomContainer molecule = ((IAtomContainer)reader.next()); result.classify(molecule); result.assignResult(molecule); //Just print the result for (String resultProperty : result.getResultPropertyNames()) System.out.println(String.format("%s=%s", resultProperty,molecule.getProperty(resultProperty))); //save all properties (both read from the input file and calculated) writer.setSdFields(molecule.getProperties()); writer.write(molecule); } out.close(); reader.close(); } }
- OpenTox API web services.
Toxtree modules are avalable as OpenTox REST API web services. The example assumes your dataset is uploaded to an OpenTox dataset service.
The dataset service accepts common chemical data formats for upload via HTTP POST calls. More OpenTox API examples.curl -X POST -d "dataset_uri=http://apps.ideaconsult.net:8080/ambit2/dataset/{yourdataset}" \ http://apps.ideaconsult.net/ambit2/model/2
- How to use Toxtree on command line only (headless, without UI) and select specific module?
-
- For headless Toxtree, use the option -n
- To select a module, use option -m
java -jar Toxtree-3.1.0.1851.jar --help -b,--batch [file] Batch file -h,--help This help -i,--input [file] Input file -m,--module [class] Full class name of a Toxtree plugin -n,--noui Command line only, do not start UI -o,--output [file] Output file
Example:
java -jar Toxtree-3.1.0.1851.jar -n -i test.csv -o out.csv java -jar Toxtree-3.1.0.1851.jar -i test.csv -n -o out.csv -m toxtree.plugins.ames.AmesMutagenicityRules
The full class names are as follow:
- toxtree.plugins.ames.AmesMutagenicityRules
- com.molecularnetworks.start.BiodegradationRules
- toxTree.tree.cramer.CramerRules
- cramer2.CramerRulesWithExtensions
- toxtree.tree.cramer3.RevisedCramerDecisionTree
- toxtree.plugins.dnabinding.DNABindingPlugin
- eye.EyeIrritationRules
- toxtree.plugins.func.FuncRules
- toxtree.plugins.kroes.Kroes1Tree
- mic.MICRules
- michaelacceptors.MichaelAcceptorRules
- toxtree.plugins.moa.MOARules
- mutant.BB_CarcMutRules
- toxtree.plugins.proteinbinding.ProteinBindingPlugin
- sicret.SicretRules
- toxtree.plugins.smartcyp.SMARTCYPPlugin
- verhaar.VerhaarScheme
- verhaar2.VerhaarScheme2