rbbt-sources 3.2.15 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/etc/allowed_biomart_archives +2 -0
- data/lib/rbbt/sources/PRO.rb +2 -2
- data/lib/rbbt/sources/biomart.rb +2 -2
- data/lib/rbbt/sources/go.rb +1 -1
- data/lib/rbbt/sources/pubmed.rb +3 -1
- data/lib/rbbt/sources/signor.rb +6 -2
- data/lib/rbbt/sources/tfacts.rb +1 -0
- metadata +13 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b10dbe140b4c0733476823e5f5d94e57a3d9a755fc370f6b9640d1e7b8efc368
|
4
|
+
data.tar.gz: 38aaf56670a07537ad0ef0c025d17e655fc5d7fb87d97ee1c08d0af82c44fbbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8ac9df1da30fc7aec3c54a5a200a0c7a9629807b9238089a1e8064e78b0ecd5bad36c4b6a77fac7e7cfdf332ad56be06149b12d0e0fd7f6506b0b82d2e03bcf
|
7
|
+
data.tar.gz: acff50e8bdb0d4443c3e1dbd237539953206b7d5dcb886db64ec0677f7bba43cf3a9782e4147985a9b3fc1b34df692e89fb2b7185f2aa0f93ccd196a4d19d54a
|
data/lib/rbbt/sources/PRO.rb
CHANGED
@@ -14,7 +14,7 @@ module PRO
|
|
14
14
|
#self.search_paths[:default] = :lib
|
15
15
|
|
16
16
|
PRO.claim PRO.identifiers, :proc do
|
17
|
-
url = "ftp://ftp.
|
17
|
+
url = "ftp://ftp.proteininformationresource.org/databases/ontology/pro_obo/PRO_mappings/uniprotmapping.txt"
|
18
18
|
|
19
19
|
dumper = TSV::Dumper.new :key_field => "PRO ID", :fields => ["UniProt/SwissProt Accession"], :type => :double, :namespace => PRO.organism
|
20
20
|
dumper.init
|
@@ -22,7 +22,7 @@ module PRO
|
|
22
22
|
pro, uni = line.split("\t")
|
23
23
|
[pro, [uni.split(":").last]]
|
24
24
|
end
|
25
|
-
|
25
|
+
dumper.tsv merge: true
|
26
26
|
end
|
27
27
|
|
28
28
|
PRO.claim PRO.uniprot_equivalences, :proc do
|
data/lib/rbbt/sources/biomart.rb
CHANGED
@@ -15,7 +15,7 @@ module BioMart
|
|
15
15
|
|
16
16
|
BIOMART_URL = 'http://www.ensembl.org/biomart/martservice?query='
|
17
17
|
|
18
|
-
MISSING_IN_ARCHIVE = Rbbt.etc.biomart.missing_in_archive.exists? ? Rbbt.etc.biomart.missing_in_archive.yaml : {}
|
18
|
+
MISSING_IN_ARCHIVE = Rbbt.etc.biomart.missing_in_archive.exists? ? Rbbt.etc.biomart.missing_in_archive.find.yaml : {}
|
19
19
|
|
20
20
|
private
|
21
21
|
|
@@ -33,7 +33,7 @@ module BioMart
|
|
33
33
|
|
34
34
|
def self.set_archive(date)
|
35
35
|
if defined? Rbbt and Rbbt.etc.allowed_biomart_archives.exists?
|
36
|
-
raise "Biomart archive #{ date } is not allowed in this installation" unless Rbbt.etc.allowed_biomart_archives.read.split("\n").include? date
|
36
|
+
raise "Biomart archive #{ date } is not allowed in this installation" unless Rbbt.etc.allowed_biomart_archives.find.read.split("\n").include? date
|
37
37
|
end
|
38
38
|
Thread.current['archive'] = date
|
39
39
|
Thread.current['archive_url'] = BIOMART_URL.sub(/www/, date + '.archive')
|
data/lib/rbbt/sources/go.rb
CHANGED
@@ -18,7 +18,7 @@ module GO
|
|
18
18
|
|
19
19
|
|
20
20
|
MULTIPLE_VALUE_FIELDS = %w(is_a)
|
21
|
-
TSV_GENE_ONTOLOGY = File.join(Persist.cachedir, 'gene_ontology')
|
21
|
+
#TSV_GENE_ONTOLOGY = File.join(Persist.cachedir, 'gene_ontology')
|
22
22
|
|
23
23
|
# This method needs to be called before any translations can be made, it is
|
24
24
|
# called automatically the first time the id2name method is called. It loads
|
data/lib/rbbt/sources/pubmed.rb
CHANGED
@@ -241,11 +241,13 @@ module PubMed
|
|
241
241
|
pmids = [pmids] unless Array === pmids
|
242
242
|
pmids = pmids.compact.collect{|id| id}
|
243
243
|
|
244
|
+
chunk_size = 50
|
244
245
|
result_files = FileCache.cache_online_elements(pmids, 'pubmed-{ID}.xml') do |ids|
|
245
246
|
result = {}
|
246
247
|
values = []
|
247
|
-
chunks = Misc.divide(ids, (ids.length /
|
248
|
+
chunks = Misc.divide(ids, (ids.length / chunk_size) + 1)
|
248
249
|
Log::ProgressBar.with_bar(chunks.length, :desc => "Downloading articles from PubMed") do |bar|
|
250
|
+
bar.init
|
249
251
|
chunks.each do |list|
|
250
252
|
begin
|
251
253
|
Misc.try3times do
|
data/lib/rbbt/sources/signor.rb
CHANGED
@@ -19,7 +19,11 @@ module Signor
|
|
19
19
|
end
|
20
20
|
|
21
21
|
Signor.claim Signor.data, :proc do
|
22
|
-
|
22
|
+
begin
|
23
|
+
Signor[".source/all.csv"].tsv :header_hash => '', :merge => true, :zipped => true
|
24
|
+
rescue
|
25
|
+
Signor[".source/all.csv"].tsv :header_hash => '', :merge => true, :one2one => true
|
26
|
+
end
|
23
27
|
end
|
24
28
|
|
25
29
|
Signor.claim Signor.protein_protein, :proc do
|
@@ -57,7 +61,7 @@ module Signor
|
|
57
61
|
#uni2name = Organism.identifiers(organism).index :target => "Associated Gene Name", :fields => ["UniProt/SwissProt Accession"], :persist => true
|
58
62
|
uni2name = UniProt.identifiers.Hsa.index :target => "Associated Gene Name", :fields => ["UniProt/SwissProt Accession"], :persist => true
|
59
63
|
|
60
|
-
parser = TSV::Parser.new Signor.data
|
64
|
+
parser = TSV::Parser.new Signor.data.produce
|
61
65
|
fields = parser.fields
|
62
66
|
dumper = TSV::Dumper.new :key_field => "Source (UniProt/SwissProt Accession)", :fields => ["Target (Associated Gene Name)", "Effect", "Sign", "PMID"], :type => :double, :merge => true, :organism => Signor.organism
|
63
67
|
dumper.init
|
data/lib/rbbt/sources/tfacts.rb
CHANGED
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.
|
4
|
+
version: 3.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbbt-util
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 4.0.0
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: nokogiri
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: net-ftp
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -178,24 +164,24 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
178
164
|
- !ruby/object:Gem::Version
|
179
165
|
version: '0'
|
180
166
|
requirements: []
|
181
|
-
rubygems_version: 3.
|
167
|
+
rubygems_version: 3.5.0.dev
|
182
168
|
signing_key:
|
183
169
|
specification_version: 4
|
184
170
|
summary: Data sources for the Ruby Bioinformatics Toolkit (rbbt)
|
185
171
|
test_files:
|
172
|
+
- test/rbbt/sources/test_HPRD.rb
|
173
|
+
- test/rbbt/sources/test_biomart.rb
|
174
|
+
- test/rbbt/sources/test_entrez.rb
|
186
175
|
- test/rbbt/sources/test_go.rb
|
187
|
-
- test/rbbt/sources/
|
188
|
-
- test/rbbt/sources/
|
189
|
-
- test/rbbt/sources/
|
176
|
+
- test/rbbt/sources/test_gscholar.rb
|
177
|
+
- test/rbbt/sources/test_kegg.rb
|
178
|
+
- test/rbbt/sources/test_matador.rb
|
190
179
|
- test/rbbt/sources/test_organism.rb
|
191
|
-
- test/rbbt/sources/
|
192
|
-
- test/rbbt/sources/
|
180
|
+
- test/rbbt/sources/test_pharmagkb.rb
|
181
|
+
- test/rbbt/sources/test_pina.rb
|
182
|
+
- test/rbbt/sources/test_pubmed.rb
|
193
183
|
- test/rbbt/sources/test_stitch.rb
|
194
|
-
- test/rbbt/sources/test_biomart.rb
|
195
|
-
- test/rbbt/sources/test_HPRD.rb
|
196
184
|
- test/rbbt/sources/test_string.rb
|
197
|
-
- test/rbbt/sources/
|
185
|
+
- test/rbbt/sources/test_synapse.rb
|
198
186
|
- test/rbbt/sources/test_tfacts.rb
|
199
|
-
- test/rbbt/sources/test_matador.rb
|
200
|
-
- test/rbbt/sources/test_gscholar.rb
|
201
187
|
- test/test_helper.rb
|