diff options
author | Christoph Helma <helma@in-silico.ch> | 2015-10-08 10:43:43 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2015-10-08 10:43:43 +0200 |
commit | 1a56148aadef031c4f487bc23fda43f4ac5b7369 (patch) | |
tree | 3555c5883ed0c292b105c40c185ebba3e5bd4e3e /test/descriptor-long.rb | |
parent | 394d564699756288569169ff3e198d6d7702f092 (diff) | |
parent | e3217075b602a950a0ee995fcfa731d97b5ba3eb (diff) |
new master branch
Diffstat (limited to 'test/descriptor-long.rb')
-rw-r--r-- | test/descriptor-long.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/descriptor-long.rb b/test/descriptor-long.rb new file mode 100644 index 0000000..7a4c00f --- /dev/null +++ b/test/descriptor-long.rb @@ -0,0 +1,26 @@ +require_relative "setup.rb" +class DescriptorLongTest < MiniTest::Test + + def test_dataset_all + # TODO: improve CDK descriptor calculation speed or add timeout + skip "CDK descriptor calculation takes too long for some compounds" + dataset = OpenTox::Dataset.from_csv_file File.join(DATA_DIR,"hamster_carcinogenicity.mini.csv") + d = OpenTox::Algorithm::Descriptor.physchem dataset + assert_equal dataset.compounds, d.compounds + assert_equal 332, d.features.size + assert_equal 332, d.data_entries.first.size + d.delete + end + + def test_dataset_openbabel + # TODO: improve CDK descriptor calculation speed or add timeout + dataset = Dataset.from_csv_file File.join(DATA_DIR,"hamster_carcinogenicity.mini.csv") + d = Algorithm::Descriptor.physchem dataset, Algorithm::Descriptor::OBDESCRIPTORS.keys + assert_equal dataset.compounds, d.compounds + size = Algorithm::Descriptor::OBDESCRIPTORS.keys.size + assert_equal size, d.features.size + assert_equal size, d.data_entries.first.size + d.delete + end + +end |