rbbt-sources 3.1.10 → 3.1.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rbbt/sources/tfacts.rb +6 -4
  3. metadata +11 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 47f883226de2b2dd6a0d9a91473aa012d2930f21
4
- data.tar.gz: db8145fdcc9052ee7db1d7934153c623b0ab77b5
3
+ metadata.gz: 9883483307ee8d88dcc1b7a8ce6e82e2a1521f7e
4
+ data.tar.gz: ce5f86b1db3b370ccb53539641de478fb5aef1e3
5
5
  SHA512:
6
- metadata.gz: d28848abcab0fd26b016f1e50a53572d338d8cd8de02d451730f49199ba39e5453033b286297aeaaa29e71f3a30dd7eebb92c43cf3fae5344298f3a7ce202099
7
- data.tar.gz: 8e6763e6d1a082a907735444dd81424a18179ab68b65e2705708b6d5d440a6ec8a1a5658d51310a5558562e7cdf9f42cc8d6d14e3e81a6365a4b2fc339331a9a
6
+ metadata.gz: 312842cd07dc73920d0e346d43d4c228c0d48c4d441b421fb5b27e975d7a42fe72af1ccfa864695e86d4b63c1621f4b3731f39ae7f17e105b3ea544eb198fd27
7
+ data.tar.gz: d0c9288317e0cdf83a2862c79e0c8713bf521c1c1e0596d7e6c91ba01a38cdc6b2d953f9ff8b8674fd63a34807876e390927fc525e1102cbe57e87d80486f076
@@ -27,15 +27,17 @@ module TFacts
27
27
  TFacts.claim TFacts.targets_signed, :proc do
28
28
  require 'spreadsheet'
29
29
  book = Spreadsheet.open TFacts[".source"]["Catalogues.xls"].produce.find
30
- sheet = book.worksheet 0
30
+ sheet = book.worksheet 1
31
31
 
32
- tsv = TSV.setup({}, :key_field => "Target Gene (Associated Gene Name)", :fields => ["Transcription Factor (Associated Gene Name)", "Sign"], :namespace => "Hsa", :type => :double)
32
+ tsv = TSV.setup({}, :key_field => "Target Gene (Associated Gene Name)", :fields => ["Transcription Factor (Associated Gene Name)", "Sign", "PMID"], :namespace => "Hsa", :type => :double)
33
33
  sheet.each do |row|
34
- target, tf, sign = row.values_at 0, 1, 2
34
+ target, tf, sign, pmid = row.values_at(0, 1, 2, 5).collect{|e| e.to_s.gsub("\n", " ") }
35
+ pmid = pmid.split(";").select{|p| p =~ /^\d{5,}$/ }
35
36
  next if tf =~ /OFFICIAL_/
36
- tsv[target] ||= [[],[]]
37
+ tsv[target] ||= [[],[],[]]
37
38
  tsv[target][0] << tf
38
39
  tsv[target][1] << sign
40
+ tsv[target][2] << pmid * ";"
39
41
  end
40
42
 
41
43
  tsv.to_s
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-sources
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.10
4
+ version: 3.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-15 00:00:00.000000000 Z
11
+ date: 2017-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbbt-util
@@ -180,19 +180,19 @@ signing_key:
180
180
  specification_version: 4
181
181
  summary: Data sources for the Ruby Bioinformatics Toolkit (rbbt)
182
182
  test_files:
183
- - test/test_helper.rb
184
183
  - test/rbbt/sources/test_pubmed.rb
185
- - test/rbbt/sources/test_string.rb
186
- - test/rbbt/sources/test_gscholar.rb
184
+ - test/rbbt/sources/test_pharmagkb.rb
187
185
  - test/rbbt/sources/test_biomart.rb
188
- - test/rbbt/sources/test_go.rb
186
+ - test/rbbt/sources/test_gscholar.rb
187
+ - test/rbbt/sources/test_kegg.rb
189
188
  - test/rbbt/sources/test_pina.rb
190
189
  - test/rbbt/sources/test_entrez.rb
191
- - test/rbbt/sources/test_pharmagkb.rb
192
- - test/rbbt/sources/test_organism.rb
193
190
  - test/rbbt/sources/test_matador.rb
194
- - test/rbbt/sources/test_tfacts.rb
195
- - test/rbbt/sources/test_kegg.rb
191
+ - test/rbbt/sources/test_HPRD.rb
196
192
  - test/rbbt/sources/test_synapse.rb
193
+ - test/rbbt/sources/test_go.rb
197
194
  - test/rbbt/sources/test_stitch.rb
198
- - test/rbbt/sources/test_HPRD.rb
195
+ - test/rbbt/sources/test_organism.rb
196
+ - test/rbbt/sources/test_string.rb
197
+ - test/rbbt/sources/test_tfacts.rb
198
+ - test/test_helper.rb