bio-unichem 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.3.0
@@ -128,8 +128,7 @@ module Bio
128
128
  Data, provided by IBM-NIH, was originally extracted from patents from three publishing bodies (US, EPO and WIPO) with publication dates through (including) 2000-12-31. For UniChem, these data were parsed to include only whole molecules present in either the title or claims fields. Further filters included removal of: 1. All molecules mapping to > 10,000 patents, 2. Non-organic molecules, 3. Small molecules (mw <90, number of atoms < 7). In addition, for structures mapping to >100 patents, only 100 randomly selected patents were selected. Identifiers in UniChem are patent number identifiers
129
129
  SMILES download available. Converted to InChi in house. Patent Ids used for Ids instead of cpd_ids. Data set filtered to remove compounds not appearing in the title or claims sections of the patent, and to remove very frequently occurring compounds
130
130
  |
131
- delimiter = "/\/\//"
132
- Data = data.strip.split(delimiter).map do |record|
131
+ Data = data.strip.split("\/\/").map do |record|
133
132
  t = record.strip.split("\n").map {|line| line.strip }
134
133
  Bio::UniChem::Source.new({"src_id" => t[0],
135
134
  "short_name" => t[1],
@@ -67,9 +67,14 @@ class TestBioUniChemModelSources < Test::Unit::TestCase
67
67
  assert_equal(Bio::UniChem::Sources["chembl"].src_id, "1")
68
68
  end
69
69
 
70
- def test_a_src_id
70
+ def test_a_src_id_1
71
71
  assert_equal(Bio::UniChem::Sources["1"].class, Bio::UniChem::Source)
72
72
  assert_equal(Bio::UniChem::Sources["1"].short_name, "chembl")
73
73
  end
74
+
75
+ def test_a_src_id_2
76
+ assert_equal(Bio::UniChem::Sources["2"].class, Bio::UniChem::Source)
77
+ assert_equal(Bio::UniChem::Sources["2"].short_name, "drugbank")
78
+ end
74
79
 
75
80
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bio-unichem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -146,7 +146,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
146
146
  version: '0'
147
147
  segments:
148
148
  - 0
149
- hash: -3343144475964350596
149
+ hash: -3418758230057508525
150
150
  required_rubygems_version: !ruby/object:Gem::Requirement
151
151
  none: false
152
152
  requirements: