Toxtree 2.5.1 is the latest stable release. The latest development version is ToxTree 2.5.8 (Maven repository).
The list of supported file formats can be found in the user manual. A brief list of the most common formats follows:
NAME,CAS,SMILES
Acetic acid,64-19-7,CC(O)=O
Acetoin,513-86-0,CC(O)C(C)=O
Chemical identifiers are resolved via remote server (if enabled). The remote query may fail to retrieve an identifier for the following reasons:
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):
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();
}
}
curl -X POST -d "dataset_uri=http://apps.ideaconsult.net:8080/ambit2/dataset/{yourdataset}" \
http://apps.ideaconsult.net:8080/ambit2/model/2