rbbt-sources 3.1.34 → 3.1.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rbbt/sources/organism.rb +16 -10
- data/share/Ensembl/release_dates +6 -0
- data/share/install/Organism/organism_helpers.rb +13 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff1cc882305d8bc0a5e81407d78870177f500537
|
4
|
+
data.tar.gz: 260dcaa7cb7e84de2aaf0293027fecb59712c2ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e63dd46454833e824492e6116b732df01166d87a89d49536d15bda6ce9bf826ef5712ed1a04a3f673a4aad1fc233089071c074fcd3cbbca5fafcf99c08c5f7e7
|
7
|
+
data.tar.gz: c57c92936d4a2afce719d488ad1d5a8e800c13e1d64e01085ca2835f288a2d208ca2e2cbc8badf432b338e38b8fdc8f25dc9b2d1d700a944a21b187950cc3bfd
|
@@ -8,6 +8,7 @@ module Organism
|
|
8
8
|
|
9
9
|
ARCHIVE_MONTH_INDEX = {}
|
10
10
|
%w(jan feb mar apr may jun jul aug sep oct nov dec).each_with_index{|d,i| ARCHIVE_MONTH_INDEX[d] = i }
|
11
|
+
|
11
12
|
def self.compare_archives(a1, a2)
|
12
13
|
a1 = a1.partition("/").last if a1 and a1.include? "/"
|
13
14
|
a2 = a2.partition("/").last if a2 and a2.include? "/"
|
@@ -65,21 +66,26 @@ module Organism
|
|
65
66
|
|
66
67
|
def self.hg_build(organism)
|
67
68
|
require 'rbbt/sources/ensembl_ftp'
|
69
|
+
return 'hg19' unless organism =~ /\//
|
68
70
|
|
69
|
-
|
71
|
+
species, date = organism.split("/")
|
70
72
|
|
71
|
-
|
72
|
-
|
73
|
+
case species
|
74
|
+
when "Hsa"
|
75
|
+
date = organism.split("/")[1]
|
73
76
|
|
74
|
-
|
77
|
+
release = Ensembl.releases[date]
|
75
78
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
79
|
+
release_number = release.sub(/.*-/,'').to_i
|
80
|
+
if release_number <= 54
|
81
|
+
'hg18'
|
82
|
+
elsif release_number <= 75
|
83
|
+
'hg19'
|
84
|
+
else
|
85
|
+
'hg38'
|
86
|
+
end
|
81
87
|
else
|
82
|
-
'
|
88
|
+
raise "Only organism 'Hsa' (Homo sapiens) supported" unless organism =~ /^Hsa/
|
83
89
|
end
|
84
90
|
end
|
85
91
|
|
data/share/Ensembl/release_dates
CHANGED
@@ -784,3 +784,16 @@ file 'uniprot2ensembl' => ["protein_sequence", "protein_identifiers"] do |t|
|
|
784
784
|
end
|
785
785
|
Misc.sensiblewrite(t.name, dumper.stream)
|
786
786
|
end
|
787
|
+
|
788
|
+
file 'gene_set' do |t|
|
789
|
+
path = File.expand_path(t.name)
|
790
|
+
dirname = File.dirname(path)
|
791
|
+
organism = File.basename(dirname)
|
792
|
+
|
793
|
+
release = Ensembl.org2release(organism)
|
794
|
+
num = release.split("-").last
|
795
|
+
build_code = num.to_i > 75 ? "GRCh38" : "GRCh37"
|
796
|
+
url = "ftp://ftp.ensembl.org/pub/release-#{num}/gtf/homo_sapiens/Homo_sapiens.#{build_code}.#{num}.gtf.gz"
|
797
|
+
CMD.cmd("wget '#{url}' -O #{t.name}.gz")
|
798
|
+
nil
|
799
|
+
end
|
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.
|
4
|
+
version: 3.1.35
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbbt-util
|