diff options
author | mguetlein <martin.guetlein@gmail.com> | 2012-12-04 11:37:40 +0100 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2012-12-04 11:37:40 +0100 |
commit | a67af6bf5875bb96e8253d8c954f8033919eaec2 (patch) | |
tree | 6cf7ca2244dee3cbae07737d11a210045dca5da0 | |
parent | bf3ece6d16a4b62f56980e108c30cbefebf53a84 (diff) |
removing inchi encoding from csv export and import
-rw-r--r-- | lib/parser.rb | 2 | ||||
-rw-r--r-- | lib/serializer.rb | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/parser.rb b/lib/parser.rb index 1f15621..eb40c2a 100644 --- a/lib/parser.rb +++ b/lib/parser.rb @@ -471,7 +471,7 @@ module OpenTox id = row.shift case id when /InChI/ - compound = Compound.from_inchi(URI.decode_www_form_component(id)) + compound = Compound.from_inchi(id) else compound = Compound.from_smiles(id) end diff --git a/lib/serializer.rb b/lib/serializer.rb index 034415d..cd58983 100644 --- a/lib/serializer.rb +++ b/lib/serializer.rb @@ -507,14 +507,13 @@ module OpenTox } @rows += dataset.compounds.collect do |compound| # assumes compounds list with duplicates - inchi_unenc = Compound.new(compound).to_inchi - inchi = URI.encode_www_form_component(inchi_unenc) + inchi = Compound.new(compound).to_inchi i = which_row[compound] # select appropriate feature value # allocate row row = Array.new(@rows.first.size) - row[0] = inchi + row[0] = "\""+inchi+"\"" # fill entries entries=dataset.data_entries[compound] |