bio-ucsc-api 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog.md +3 -0
- data/Gemfile +6 -6
- data/Gemfile.lock +59 -30
- data/README.md +17 -13
- data/VERSION +1 -1
- data/bio-ucsc-api.gemspec +40 -45
- data/lib/bio-ucsc.rb +4 -3
- data/lib/bio-ucsc/drosim1.rb +1 -1
- data/lib/bio-ucsc/galgal4.rb +65 -0
- data/lib/bio-ucsc/hgfixed.rb +0 -1
- data/lib/bio-ucsc/rn5.rb +66 -0
- data/lib/bio-ucsc/rn5/chaincanfam2.rb +82 -0
- data/lib/bio-ucsc/{galgal3/chainmm9link.rb → rn5/chaincanfam2link.rb} +7 -9
- data/lib/bio-ucsc/{galgal3 → rn5}/chaincavpor3.rb +3 -6
- data/lib/bio-ucsc/rn5/chaincavpor3link.rb +81 -0
- data/lib/bio-ucsc/{galgal3 → rn5}/chaindanrer4.rb +3 -6
- data/lib/bio-ucsc/rn5/chaindanrer4link.rb +81 -0
- data/lib/bio-ucsc/rn5/chainequcab1.rb +81 -0
- data/lib/bio-ucsc/rn5/chainequcab1link.rb +81 -0
- data/lib/bio-ucsc/rn5/chaingalgal3.rb +81 -0
- data/lib/bio-ucsc/rn5/chaingalgal3link.rb +81 -0
- data/lib/bio-ucsc/{galgal3 → rn5}/chainmm9.rb +3 -6
- data/lib/bio-ucsc/rn5/chainmm9link.rb +81 -0
- data/lib/bio-ucsc/rn5/chainmondom4.rb +81 -0
- data/lib/bio-ucsc/rn5/chainmondom4link.rb +81 -0
- data/lib/bio-ucsc/{galgal3/chainfr2link.rb → rn5/chainpantro2.rb} +5 -8
- data/lib/bio-ucsc/{galgal3/chainrn4.rb → rn5/chainpantro2link.rb} +6 -8
- data/lib/bio-ucsc/rn5/chainrhemac2.rb +81 -0
- data/lib/bio-ucsc/rn5/chainrhemac2link.rb +81 -0
- data/lib/bio-ucsc/{galgal3 → rn5}/est.rb +2 -5
- data/lib/bio-ucsc/{galgal3 → rn5}/gap.rb +2 -5
- data/lib/bio-ucsc/{galgal3 → rn5}/gold.rb +2 -5
- data/lib/bio-ucsc/{galgal3 → rn5}/intronest.rb +2 -5
- data/lib/bio-ucsc/{galgal3 → rn5}/mrna.rb +2 -5
- data/lib/bio-ucsc/{galgal3 → rn5}/rmsk.rb +2 -5
- data/lib/bio-ucsc/taegut1/chaingalgal3.rb +1 -1
- data/lib/bio-ucsc/taegut1/chaingalgal3link.rb +1 -1
- data/lib/bio-ucsc/visigene.rb +0 -1
- metadata +55 -60
- data/lib/bio-ucsc/galgal3.rb +0 -56
- data/lib/bio-ucsc/galgal3/chainanocar1.rb +0 -84
- data/lib/bio-ucsc/galgal3/chainanocar1link.rb +0 -84
- data/lib/bio-ucsc/galgal3/chainbraflo1.rb +0 -84
- data/lib/bio-ucsc/galgal3/chainbraflo1link.rb +0 -84
- data/lib/bio-ucsc/galgal3/chaincavpor3link.rb +0 -84
- data/lib/bio-ucsc/galgal3/chaindanrer4link.rb +0 -84
- data/lib/bio-ucsc/galgal3/chainfr2.rb +0 -84
- data/lib/bio-ucsc/galgal3/chaingasacu1.rb +0 -84
- data/lib/bio-ucsc/galgal3/chaingasacu1link.rb +0 -84
- data/lib/bio-ucsc/galgal3/chainornana1.rb +0 -84
- data/lib/bio-ucsc/galgal3/chainornana1link.rb +0 -84
- data/lib/bio-ucsc/galgal3/chainpetmar1.rb +0 -84
- data/lib/bio-ucsc/galgal3/chainpetmar1link.rb +0 -84
- data/lib/bio-ucsc/galgal3/chainrn4link.rb +0 -84
- data/lib/bio-ucsc/galgal3/chaintaegut1.rb +0 -84
- data/lib/bio-ucsc/galgal3/chaintaegut1link.rb +0 -84
- data/lib/bio-ucsc/galgal3/chainxentro2.rb +0 -84
- data/lib/bio-ucsc/galgal3/chainxentro2link.rb +0 -84
data/ChangeLog.md
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
#Change Log
|
2
|
+
* **BUG-FIX** (v 0.5.3): Support ActiveRecord/ActiveSupport version 3 only.
|
3
|
+
* **UPDATE** (v 0.5.3): The Rat Rn5 database is supported.
|
4
|
+
* **UPDATE** (v 0.5.3): Bug-fix and update to pass all specs on Ruby 2.0.0-p0.
|
2
5
|
* **BUG-FIX** (v 0.5.2): Fix a Bio::Ucsc::File::Twobit#subseq error when a query region is all included by a masked (Ns) region
|
3
6
|
* **UPDATE** (v.0.5.1): Mouse mm10 database is supported.
|
4
7
|
* **BUG-FIX** (v.0.5.0): Connecting multiple databeses simultaneously now works well.
|
data/Gemfile
CHANGED
@@ -2,8 +2,8 @@ source "http://rubygems.org"
|
|
2
2
|
# Add dependencies required to use your gem here.
|
3
3
|
# Example:
|
4
4
|
# gem "activesupport", ">= 2.3.5"
|
5
|
-
gem "activerecord", "
|
6
|
-
gem "activesupport", "
|
5
|
+
gem "activerecord", "~> 3.0.7"
|
6
|
+
gem "activesupport", "~> 3.0.7"
|
7
7
|
gem "mysql", "~> 2.8.1"
|
8
8
|
gem "bio-genomic-interval", ">= 0.1.2"
|
9
9
|
gem "safe_attributes", ">= 1.0.8"
|
@@ -11,11 +11,11 @@ gem "safe_attributes", ">= 1.0.8"
|
|
11
11
|
# Add dependencies to develop your gem here.
|
12
12
|
# Include everything needed to run rake, tests, features, etc.
|
13
13
|
group :development do
|
14
|
-
gem "rake", "~> 0.9.2.2"
|
14
|
+
gem "rake", "~> 10.1.0" # was "~> 0.9.2.2"
|
15
15
|
gem "rspec", "~> 2.9.0" # was ~> 2.5.0
|
16
|
-
gem "bundler", "~> 1.
|
16
|
+
gem "bundler", "~> 1.3.5" # was ~>1.1.0 was ~> 1.0.0
|
17
17
|
gem "jeweler", "~> 1.8.3" # was ~> 1.5.2
|
18
|
-
# gem "simplecov", :require => false, :group => :test
|
19
18
|
gem "bio", ">= 1.4.1"
|
20
19
|
gem "rdoc", ">= 3.9.1"
|
21
|
-
|
20
|
+
# gem "simplecov", :require => false, :group => :test
|
21
|
+
end
|
data/Gemfile.lock
CHANGED
@@ -1,62 +1,91 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
activemodel (3.
|
5
|
-
activesupport (= 3.
|
6
|
-
builder (~>
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
arel (
|
16
|
-
bio (1.4.
|
4
|
+
activemodel (3.0.20)
|
5
|
+
activesupport (= 3.0.20)
|
6
|
+
builder (~> 2.1.2)
|
7
|
+
i18n (~> 0.5.0)
|
8
|
+
activerecord (3.0.20)
|
9
|
+
activemodel (= 3.0.20)
|
10
|
+
activesupport (= 3.0.20)
|
11
|
+
arel (~> 2.0.10)
|
12
|
+
tzinfo (~> 0.3.23)
|
13
|
+
activesupport (3.0.20)
|
14
|
+
addressable (2.3.5)
|
15
|
+
arel (2.0.10)
|
16
|
+
bio (1.4.3.0001)
|
17
17
|
bio-genomic-interval (0.1.2)
|
18
|
-
builder (
|
18
|
+
builder (2.1.2)
|
19
19
|
diff-lcs (1.1.3)
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
faraday (0.8.8)
|
21
|
+
multipart-post (~> 1.2.0)
|
22
|
+
git (1.2.6)
|
23
|
+
github_api (0.10.1)
|
24
|
+
addressable
|
25
|
+
faraday (~> 0.8.1)
|
26
|
+
hashie (>= 1.2)
|
27
|
+
multi_json (~> 1.4)
|
28
|
+
nokogiri (~> 1.5.2)
|
29
|
+
oauth2
|
30
|
+
hashie (2.0.5)
|
31
|
+
highline (1.6.19)
|
32
|
+
httpauth (0.2.0)
|
33
|
+
i18n (0.5.0)
|
34
|
+
jeweler (1.8.7)
|
35
|
+
builder
|
23
36
|
bundler (~> 1.0)
|
24
37
|
git (>= 1.2.5)
|
38
|
+
github_api (= 0.10.1)
|
39
|
+
highline (>= 1.6.15)
|
40
|
+
nokogiri (= 1.5.10)
|
25
41
|
rake
|
26
42
|
rdoc
|
27
|
-
json (1.
|
28
|
-
json (1.
|
29
|
-
|
43
|
+
json (1.8.0)
|
44
|
+
json (1.8.0-java)
|
45
|
+
jwt (0.1.8)
|
46
|
+
multi_json (>= 1.5)
|
47
|
+
multi_json (1.7.9)
|
48
|
+
multi_xml (0.5.5)
|
49
|
+
multipart-post (1.2.0)
|
30
50
|
mysql (2.8.1)
|
31
|
-
|
32
|
-
|
51
|
+
nokogiri (1.5.10)
|
52
|
+
nokogiri (1.5.10-java)
|
53
|
+
oauth2 (0.9.2)
|
54
|
+
faraday (~> 0.8)
|
55
|
+
httpauth (~> 0.2)
|
56
|
+
jwt (~> 0.1.4)
|
57
|
+
multi_json (~> 1.0)
|
58
|
+
multi_xml (~> 0.5)
|
59
|
+
rack (~> 1.2)
|
60
|
+
rack (1.5.2)
|
61
|
+
rake (10.1.0)
|
62
|
+
rdoc (4.0.1)
|
33
63
|
json (~> 1.4)
|
34
64
|
rspec (2.9.0)
|
35
65
|
rspec-core (~> 2.9.0)
|
36
66
|
rspec-expectations (~> 2.9.0)
|
37
67
|
rspec-mocks (~> 2.9.0)
|
38
68
|
rspec-core (2.9.0)
|
39
|
-
rspec-expectations (2.9.
|
69
|
+
rspec-expectations (2.9.1)
|
40
70
|
diff-lcs (~> 1.1.3)
|
41
71
|
rspec-mocks (2.9.0)
|
42
|
-
safe_attributes (1.0.
|
72
|
+
safe_attributes (1.0.10)
|
43
73
|
activerecord (>= 3.0.0)
|
44
|
-
|
45
|
-
tzinfo (0.3.31)
|
74
|
+
tzinfo (0.3.37)
|
46
75
|
|
47
76
|
PLATFORMS
|
48
77
|
java
|
49
78
|
ruby
|
50
79
|
|
51
80
|
DEPENDENCIES
|
52
|
-
activerecord (
|
53
|
-
activesupport (
|
81
|
+
activerecord (~> 3.0.7)
|
82
|
+
activesupport (~> 3.0.7)
|
54
83
|
bio (>= 1.4.1)
|
55
84
|
bio-genomic-interval (>= 0.1.2)
|
56
|
-
bundler (~> 1.
|
85
|
+
bundler (~> 1.3.5)
|
57
86
|
jeweler (~> 1.8.3)
|
58
87
|
mysql (~> 2.8.1)
|
59
|
-
rake (~>
|
88
|
+
rake (~> 10.1.0)
|
60
89
|
rdoc (>= 3.9.1)
|
61
90
|
rspec (~> 2.9.0)
|
62
91
|
safe_attributes (>= 1.0.8)
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# bio-ucsc-api version 0.5.
|
1
|
+
# bio-ucsc-api version 0.5.3
|
2
2
|
|
3
3
|
**The Ruby UCSC API**: accessing the UCSC Genome Database using Ruby.
|
4
4
|
|
@@ -32,8 +32,11 @@ $ gem install bio-ucsc-api
|
|
32
32
|
* Current version does not support table-linked bigWIG/bigBED/BAM files.
|
33
33
|
|
34
34
|
# Supported databases (genome assemblies)
|
35
|
+
|
36
|
+
If your favorite databese is not supported, please do not hesitate to contact the author.
|
37
|
+
|
35
38
|
* **human** Hg19, Hg18
|
36
|
-
* **mammals** chimp (PanTro3), orangutan (PonAbe2), rhesus (RheMac2), marmoset (CalJac3), mouse (Mm10, Mm9), rat (Rn4), guinea pig (CavPor3), rabbit (OryCun2), cat (FelCat4), panda (AilMel1), dog (CanFam2), horse (EquCab2), pig (SusScr2), sheep (OviAri1), cow (BosTau4), elephant (LoxAfr3), opossum (MonDom5), platypus (OrnAna1)
|
39
|
+
* **mammals** chimp (PanTro3), orangutan (PonAbe2), rhesus (RheMac2), marmoset (CalJac3), mouse (Mm10, Mm9), rat (Rn5, Rn4), guinea pig (CavPor3), rabbit (OryCun2), cat (FelCat4), panda (AilMel1), dog (CanFam2), horse (EquCab2), pig (SusScr2), sheep (OviAri1), cow (BosTau4), elephant (LoxAfr3), opossum (MonDom5), platypus (OrnAna1)
|
37
40
|
* **vertebrates** chicken (GalGal3), zebra finch (TaeGut1), lizard (AnoCar2), X. tropicalis (XenTro2), zebrafish (DanRer7), tetraodon (TetNig2), fugu (Fr2), stickleback (GasAcu1), medaka (OryLat2), lamprey (PetMar1)
|
38
41
|
* **deuterostomes** lancelet (BraFlo1), sea squirt (Ci2), sea urchin (StrPur2)
|
39
42
|
[insects] D.melanogaster (Dm3), D.simulans (DroSim1), D.sechellia (DroSec1), D.yakuba (DroYak2), D.erecta (DroEre1), D.ananassae (DroAna2), D.pseudoobscura (Dp3), D.persimilis (DroPer1), D.virilis (DroVir2), D.mojavensis (DroMoj2), D.grimshawi (DroGri1), Anopheles mosquito (AnoGam1), honey bee (ApiMel2)
|
@@ -49,13 +52,14 @@ This package is based on the followings:
|
|
49
52
|
|
50
53
|
Supported Ruby interpreter implementations:
|
51
54
|
|
55
|
+
* Ruby Version 2.0.0 or later
|
52
56
|
* Ruby version 1.9.2 or later
|
53
57
|
* Ruby version 1.8.7 or later
|
54
58
|
* JRuby version 1.6.3 or later - Appropiate Java heap size may have to be specified to invoke JRuby, especially when you use Bio::Ucsc::File::Twobit. Try "jruby -J-Xmx3g your_script.rb" to keep 3G byte heap.
|
55
59
|
|
56
60
|
Major dependent gems:
|
57
61
|
|
58
|
-
* active_record - http://api.rubyonrails.org/classes/ActiveRecord/Base.html
|
62
|
+
* active_record version 3 - http://api.rubyonrails.org/classes/ActiveRecord/Base.html
|
59
63
|
* safe_attributes - https://github.com/bjones/safe_attributes
|
60
64
|
* bioruby-genomic-interval - https://github.com/misshie/bioruby-genomic-interval
|
61
65
|
* mysql (MySQL/Ruby MySQL API module) - http://www.tmtm.org/mysql/ruby/README.html
|
@@ -74,8 +78,8 @@ See 'ChangeLog.md'.
|
|
74
78
|
* Before using a database, establish a connection to the database. For example, `Bio::Ucsc::Hg19::DBConnection.connect`.
|
75
79
|
* A table in a database is represented as a class in the database module. For example, the snp132 table in the hg19 database is referred by `Bio::Ucsc::Hg19::Snp132`.
|
76
80
|
* Queries to a field (column) in a table are represented by class methods of the table class. For example, finding the first record (row) of the snp132 table in the hg19 database is `Bio::Ucsc::Hg19::Snp132.first`.
|
77
|
-
* Queries using genomic intervals are supported by the named scope ".with_intervals" and ".with_intervals_excl (omitting pertially included annotations)" method of the table class. These methods accept a genomic interval string like
|
78
|
-
* Fields in a retrieved record can be acccessed by using instance methods of a record object. For example, the name field of a table record stored in the
|
81
|
+
* Queries using genomic intervals are supported by the named scope ".with_intervals" and ".with_intervals_excl (omitting pertially included annotations)" method of the table class. These methods accept a genomic interval string like `chr1:1233-5678`. If a table to query has the "bin" column, the bin index system is automatically used to speed-up the query.
|
82
|
+
* Fields in a retrieved record can be acccessed by using instance methods of a record object. For example, the name field of a table record stored in the result" variable is `result.name`.
|
79
83
|
|
80
84
|
## Sample Codes
|
81
85
|
At first, you have to declare the API and establish the connection to a database.
|
@@ -145,9 +149,9 @@ retrieve reference sequence from a locally-stored 2bit file. The "hg19.2bit" fil
|
|
145
149
|
Connetcting to non-official or local full/partial mirror MySQL servers
|
146
150
|
|
147
151
|
```ruby
|
148
|
-
Ucsc::Hg18.connect
|
149
|
-
|
150
|
-
|
152
|
+
Ucsc::Hg18.connect( :db_host => 'localhost',
|
153
|
+
:db_username => 'genome',
|
154
|
+
:db_password => '' )
|
151
155
|
|
152
156
|
Ucsc::Hg18.default # reset to connect UCSC's public MySQL sever
|
153
157
|
Ucsc::Hg18.connect
|
@@ -162,11 +166,11 @@ And see also sample scripts in the samples directory.
|
|
162
166
|
* **snp2gene.rb** - sample for retrieving fields from associated tables
|
163
167
|
|
164
168
|
## Notes of Exceptions in Table Support
|
165
|
-
* Table names starting with a number: Because Ruby class names cannot start with number, use the table class name starting with "T" (T for Table). Thus, the "2micron_est" table is supported by the
|
166
|
-
* Table names starting with uppercase character: Classes for "HInv" and "NIAGene" tables are
|
167
|
-
* Accessing chromosome-specific tables: For example, the 'rmsk' table in hg18 is actually separated into 'chr1_rmsk', 'chr2_rmsk'... There is two way to access to them. (1) Accessing separated tables directly. There is no difference from other regular tables. However, you have to manage each separated tables. (2) Use abstract table classes (e.g., 'Rmsk') and their class methods
|
169
|
+
* Table names starting with a number: Because Ruby class names cannot start with number, use the table class name starting with "T" (T for Table). Thus, the "2micron_est" table is supported by the `T2micron_est` class.
|
170
|
+
* Table names starting with uppercase character: Classes for "HInv" and "NIAGene" tables are `HInv` and `NIAGene`, respectively
|
171
|
+
* Accessing chromosome-specific tables: For example, the 'rmsk' table in hg18 is actually separated into 'chr1_rmsk', 'chr2_rmsk'... There is two way to access to them. (1) Accessing separated tables directly. There is no difference from other regular tables. However, you have to manage each separated tables. (2) Use abstract table classes (e.g., 'Rmsk') and their class methods `.find_by_interval` or `.find_all_by_interval`. These methods look for correspondent separated tables automatically. However, you cannot combine with other `find_by_[field]` methods. Moreover, if you have to perform single- or multi-chromosomal search, you have to access separated tables individually and integrate results by yourself. Fortunately, recent databases, including hg19, seem not to use chromosome-specific tables.
|
168
172
|
* For honey bee ApiMel2 database, Group*_chainDm2 and Group*_chainDm2Link tables are accessible using find(_all)_by_interval class methods of the ChainDm2 and ChainDm2Link classes.
|
169
|
-
* Special field (column) names: Field names such as
|
173
|
+
* Special field (column) names: Field names such as `attribute`, `valid`, `validate`, `class`, `method`, `methods`, and `type` cannot be accessed using instance methods. This restriction is because of the collision of method names that are internally used by ActiveRecord. Instead, use hash to access the field like `result[:type]`.
|
170
174
|
|
171
175
|
## Details in "with_interval"
|
172
176
|
* When a table class is referred first time, the API prefetches the table to get a list of fields and dynamically defines a class using following algorithm.
|
@@ -228,7 +232,7 @@ puts Bio::Ucsc::Hg19::Snp131.find_by_name("rs242").snp131Seq.first.file_offset
|
|
228
232
|
```
|
229
233
|
|
230
234
|
# Copyright
|
231
|
-
**Copyright**: (c) 2011-
|
235
|
+
**Copyright**: (c) 2011-2013 MISHIMA, Hiroyuki (hmishima at nagasaki-u.ac.jp / Twitter: @mishima_eng (in English) and @mishimahryk (in Japanese)
|
232
236
|
**Copyright**: (c) 2010 Jan Aerts
|
233
237
|
**License**: Ruby license (Ruby's / GPLv2 dual). See COPYING and COPYING.ja for further details..
|
234
238
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.3
|
data/bio-ucsc-api.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "bio-ucsc-api"
|
8
|
-
s.version = "0.5.
|
8
|
+
s.version = "0.5.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Hiroyuki Mishima", "Jan Aerts"]
|
12
|
-
s.date = "
|
12
|
+
s.date = "2013-08-27"
|
13
13
|
s.description = "Ruby UCSC API: accessing the UCSC Genome Database using Ruby"
|
14
14
|
s.email = "missy@be.to"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -209,37 +209,7 @@ Gem::Specification.new do |s|
|
|
209
209
|
"lib/bio-ucsc/fr2/intronest.rb",
|
210
210
|
"lib/bio-ucsc/fr2/mrna.rb",
|
211
211
|
"lib/bio-ucsc/fr2/rmsk.rb",
|
212
|
-
"lib/bio-ucsc/
|
213
|
-
"lib/bio-ucsc/galgal3/chainanocar1.rb",
|
214
|
-
"lib/bio-ucsc/galgal3/chainanocar1link.rb",
|
215
|
-
"lib/bio-ucsc/galgal3/chainbraflo1.rb",
|
216
|
-
"lib/bio-ucsc/galgal3/chainbraflo1link.rb",
|
217
|
-
"lib/bio-ucsc/galgal3/chaincavpor3.rb",
|
218
|
-
"lib/bio-ucsc/galgal3/chaincavpor3link.rb",
|
219
|
-
"lib/bio-ucsc/galgal3/chaindanrer4.rb",
|
220
|
-
"lib/bio-ucsc/galgal3/chaindanrer4link.rb",
|
221
|
-
"lib/bio-ucsc/galgal3/chainfr2.rb",
|
222
|
-
"lib/bio-ucsc/galgal3/chainfr2link.rb",
|
223
|
-
"lib/bio-ucsc/galgal3/chaingasacu1.rb",
|
224
|
-
"lib/bio-ucsc/galgal3/chaingasacu1link.rb",
|
225
|
-
"lib/bio-ucsc/galgal3/chainmm9.rb",
|
226
|
-
"lib/bio-ucsc/galgal3/chainmm9link.rb",
|
227
|
-
"lib/bio-ucsc/galgal3/chainornana1.rb",
|
228
|
-
"lib/bio-ucsc/galgal3/chainornana1link.rb",
|
229
|
-
"lib/bio-ucsc/galgal3/chainpetmar1.rb",
|
230
|
-
"lib/bio-ucsc/galgal3/chainpetmar1link.rb",
|
231
|
-
"lib/bio-ucsc/galgal3/chainrn4.rb",
|
232
|
-
"lib/bio-ucsc/galgal3/chainrn4link.rb",
|
233
|
-
"lib/bio-ucsc/galgal3/chaintaegut1.rb",
|
234
|
-
"lib/bio-ucsc/galgal3/chaintaegut1link.rb",
|
235
|
-
"lib/bio-ucsc/galgal3/chainxentro2.rb",
|
236
|
-
"lib/bio-ucsc/galgal3/chainxentro2link.rb",
|
237
|
-
"lib/bio-ucsc/galgal3/est.rb",
|
238
|
-
"lib/bio-ucsc/galgal3/gap.rb",
|
239
|
-
"lib/bio-ucsc/galgal3/gold.rb",
|
240
|
-
"lib/bio-ucsc/galgal3/intronest.rb",
|
241
|
-
"lib/bio-ucsc/galgal3/mrna.rb",
|
242
|
-
"lib/bio-ucsc/galgal3/rmsk.rb",
|
212
|
+
"lib/bio-ucsc/galgal4.rb",
|
243
213
|
"lib/bio-ucsc/gasacu1.rb",
|
244
214
|
"lib/bio-ucsc/gasacu1/chainanocar1.rb",
|
245
215
|
"lib/bio-ucsc/gasacu1/chainanocar1link.rb",
|
@@ -397,6 +367,31 @@ Gem::Specification.new do |s|
|
|
397
367
|
"lib/bio-ucsc/rn4/intronest.rb",
|
398
368
|
"lib/bio-ucsc/rn4/mrna.rb",
|
399
369
|
"lib/bio-ucsc/rn4/rmsk.rb",
|
370
|
+
"lib/bio-ucsc/rn5.rb",
|
371
|
+
"lib/bio-ucsc/rn5/chaincanfam2.rb",
|
372
|
+
"lib/bio-ucsc/rn5/chaincanfam2link.rb",
|
373
|
+
"lib/bio-ucsc/rn5/chaincavpor3.rb",
|
374
|
+
"lib/bio-ucsc/rn5/chaincavpor3link.rb",
|
375
|
+
"lib/bio-ucsc/rn5/chaindanrer4.rb",
|
376
|
+
"lib/bio-ucsc/rn5/chaindanrer4link.rb",
|
377
|
+
"lib/bio-ucsc/rn5/chainequcab1.rb",
|
378
|
+
"lib/bio-ucsc/rn5/chainequcab1link.rb",
|
379
|
+
"lib/bio-ucsc/rn5/chaingalgal3.rb",
|
380
|
+
"lib/bio-ucsc/rn5/chaingalgal3link.rb",
|
381
|
+
"lib/bio-ucsc/rn5/chainmm9.rb",
|
382
|
+
"lib/bio-ucsc/rn5/chainmm9link.rb",
|
383
|
+
"lib/bio-ucsc/rn5/chainmondom4.rb",
|
384
|
+
"lib/bio-ucsc/rn5/chainmondom4link.rb",
|
385
|
+
"lib/bio-ucsc/rn5/chainpantro2.rb",
|
386
|
+
"lib/bio-ucsc/rn5/chainpantro2link.rb",
|
387
|
+
"lib/bio-ucsc/rn5/chainrhemac2.rb",
|
388
|
+
"lib/bio-ucsc/rn5/chainrhemac2link.rb",
|
389
|
+
"lib/bio-ucsc/rn5/est.rb",
|
390
|
+
"lib/bio-ucsc/rn5/gap.rb",
|
391
|
+
"lib/bio-ucsc/rn5/gold.rb",
|
392
|
+
"lib/bio-ucsc/rn5/intronest.rb",
|
393
|
+
"lib/bio-ucsc/rn5/mrna.rb",
|
394
|
+
"lib/bio-ucsc/rn5/rmsk.rb",
|
400
395
|
"lib/bio-ucsc/saccer2.rb",
|
401
396
|
"lib/bio-ucsc/saccer2/est.rb",
|
402
397
|
"lib/bio-ucsc/saccer2/gap.rb",
|
@@ -447,39 +442,39 @@ Gem::Specification.new do |s|
|
|
447
442
|
s.specification_version = 3
|
448
443
|
|
449
444
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
450
|
-
s.add_runtime_dependency(%q<activerecord>, ["
|
451
|
-
s.add_runtime_dependency(%q<activesupport>, ["
|
445
|
+
s.add_runtime_dependency(%q<activerecord>, ["~> 3.0.7"])
|
446
|
+
s.add_runtime_dependency(%q<activesupport>, ["~> 3.0.7"])
|
452
447
|
s.add_runtime_dependency(%q<mysql>, ["~> 2.8.1"])
|
453
448
|
s.add_runtime_dependency(%q<bio-genomic-interval>, [">= 0.1.2"])
|
454
449
|
s.add_runtime_dependency(%q<safe_attributes>, [">= 1.0.8"])
|
455
|
-
s.add_development_dependency(%q<rake>, ["~>
|
450
|
+
s.add_development_dependency(%q<rake>, ["~> 10.1.0"])
|
456
451
|
s.add_development_dependency(%q<rspec>, ["~> 2.9.0"])
|
457
|
-
s.add_development_dependency(%q<bundler>, ["~> 1.
|
452
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.3.5"])
|
458
453
|
s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
|
459
454
|
s.add_development_dependency(%q<bio>, [">= 1.4.1"])
|
460
455
|
s.add_development_dependency(%q<rdoc>, [">= 3.9.1"])
|
461
456
|
else
|
462
|
-
s.add_dependency(%q<activerecord>, ["
|
463
|
-
s.add_dependency(%q<activesupport>, ["
|
457
|
+
s.add_dependency(%q<activerecord>, ["~> 3.0.7"])
|
458
|
+
s.add_dependency(%q<activesupport>, ["~> 3.0.7"])
|
464
459
|
s.add_dependency(%q<mysql>, ["~> 2.8.1"])
|
465
460
|
s.add_dependency(%q<bio-genomic-interval>, [">= 0.1.2"])
|
466
461
|
s.add_dependency(%q<safe_attributes>, [">= 1.0.8"])
|
467
|
-
s.add_dependency(%q<rake>, ["~>
|
462
|
+
s.add_dependency(%q<rake>, ["~> 10.1.0"])
|
468
463
|
s.add_dependency(%q<rspec>, ["~> 2.9.0"])
|
469
|
-
s.add_dependency(%q<bundler>, ["~> 1.
|
464
|
+
s.add_dependency(%q<bundler>, ["~> 1.3.5"])
|
470
465
|
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
|
471
466
|
s.add_dependency(%q<bio>, [">= 1.4.1"])
|
472
467
|
s.add_dependency(%q<rdoc>, [">= 3.9.1"])
|
473
468
|
end
|
474
469
|
else
|
475
|
-
s.add_dependency(%q<activerecord>, ["
|
476
|
-
s.add_dependency(%q<activesupport>, ["
|
470
|
+
s.add_dependency(%q<activerecord>, ["~> 3.0.7"])
|
471
|
+
s.add_dependency(%q<activesupport>, ["~> 3.0.7"])
|
477
472
|
s.add_dependency(%q<mysql>, ["~> 2.8.1"])
|
478
473
|
s.add_dependency(%q<bio-genomic-interval>, [">= 0.1.2"])
|
479
474
|
s.add_dependency(%q<safe_attributes>, [">= 1.0.8"])
|
480
|
-
s.add_dependency(%q<rake>, ["~>
|
475
|
+
s.add_dependency(%q<rake>, ["~> 10.1.0"])
|
481
476
|
s.add_dependency(%q<rspec>, ["~> 2.9.0"])
|
482
|
-
s.add_dependency(%q<bundler>, ["~> 1.
|
477
|
+
s.add_dependency(%q<bundler>, ["~> 1.3.5"])
|
483
478
|
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
|
484
479
|
s.add_dependency(%q<bio>, [">= 1.4.1"])
|
485
480
|
s.add_dependency(%q<rdoc>, [">= 3.9.1"])
|
data/lib/bio-ucsc.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#
|
2
2
|
# = bio-ucsc.rb
|
3
|
-
# Copyright:: Copyright (C) 2011-
|
3
|
+
# Copyright:: Copyright (C) 2011-2013
|
4
4
|
# MISHIMA, Hiroyuki <missy at be.to / hmishima at nagasaki-u.ac.jp>
|
5
5
|
# License:: Ruby licence (Ryby's / GPLv2 dual)
|
6
6
|
|
@@ -17,7 +17,7 @@ require "#{base}/gi.rb"
|
|
17
17
|
|
18
18
|
module Bio
|
19
19
|
module Ucsc
|
20
|
-
VERSION = "0.5.
|
20
|
+
VERSION = "0.5.3"
|
21
21
|
base = "#{::File.dirname(__FILE__)}/bio-ucsc"
|
22
22
|
|
23
23
|
# mammmals #####################################
|
@@ -42,6 +42,7 @@ module Bio
|
|
42
42
|
autoload :Mm10, "#{base}/mm10"
|
43
43
|
|
44
44
|
# rat genome assemblies
|
45
|
+
autoload :Rn5, "#{base}/rn5"
|
45
46
|
autoload :Rn4, "#{base}/rn4"
|
46
47
|
|
47
48
|
# guinea pig genome assemblies
|
@@ -82,7 +83,7 @@ module Bio
|
|
82
83
|
|
83
84
|
# vertebrates #################################
|
84
85
|
# chiken genome assemblies
|
85
|
-
autoload :
|
86
|
+
autoload :GalGal4, "#{base}/galgal4"
|
86
87
|
|
87
88
|
# zebra finch genome assemblies
|
88
89
|
autoload :TaeGut1, "#{base}/taegut1"
|
data/lib/bio-ucsc/drosim1.rb
CHANGED
@@ -0,0 +1,65 @@
|
|
1
|
+
#
|
2
|
+
# = AUTOMATIC Table Definition of the Chicken May 2006 (WUGSC 2.1/galGal3) assembly
|
3
|
+
# Copyright:: Copyright (C) 2011, 2012
|
4
|
+
# MISHIMA, Hiroyuki
|
5
|
+
# <missy at be.to / hmishima at nagasaki-u.ac.jp>
|
6
|
+
# License:: The Ruby licence (Ryby's / GPLv2 dual)
|
7
|
+
#
|
8
|
+
|
9
|
+
require "#{::File.dirname(__FILE__)}/table_class_detector"
|
10
|
+
|
11
|
+
module Bio
|
12
|
+
module Ucsc
|
13
|
+
module GalGal4
|
14
|
+
CHROMS =
|
15
|
+
%w(chrM chr1 chr2 chr3 chr4 chr5 chr6 chr7 chr8 chr9 chr10
|
16
|
+
chr11 chr12 chr13 chr14 chr15 chr16 chr17 chr18 chr19 chr20
|
17
|
+
chr21 chr22 chr23 chr24 chr25 chr26 chr27 chr28 chr32 chrW chrZ)
|
18
|
+
|
19
|
+
extend TableClassDetector
|
20
|
+
def self.default
|
21
|
+
DBConnection.default
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.connect(param = Hash.new)
|
25
|
+
DBConnection.db_adapter = param[:db_adapter] if param[:db_adapter]
|
26
|
+
DBConnection.db_host = param[:db_host] if param[:db_host]
|
27
|
+
DBConnection.db_username = param[:db_username] if param[:db_username]
|
28
|
+
DBConnection.password = param[:password] if param[:password]
|
29
|
+
DBConnection.connect
|
30
|
+
end
|
31
|
+
class DBConnection < ActiveRecord::Base
|
32
|
+
include SafeAttributes
|
33
|
+
self.inheritance_column = 'dummy_not_to_use'
|
34
|
+
|
35
|
+
@@db_adapter ||= 'mysql'
|
36
|
+
@@db_host ||= 'genome-mysql.cse.ucsc.edu'
|
37
|
+
@@db_username ||= 'genome'
|
38
|
+
@@db_password ||= ''
|
39
|
+
@@db_name ||= 'galGal4'
|
40
|
+
|
41
|
+
cattr_accessor :db_adapter, :db_host, :db_username, :db_password
|
42
|
+
|
43
|
+
self.abstract_class = true
|
44
|
+
|
45
|
+
def self.default
|
46
|
+
@@db_adapter = 'mysql'
|
47
|
+
@@db_host = 'genome-mysql.cse.ucsc.edu'
|
48
|
+
@@db_username = 'genome'
|
49
|
+
@@db_password = ''
|
50
|
+
end
|
51
|
+
|
52
|
+
def self.connect
|
53
|
+
establish_connection({ :adapter => @@db_adapter,
|
54
|
+
:host => @@db_host,
|
55
|
+
:database => @@db_name,
|
56
|
+
:username => @@db_username,
|
57
|
+
:password => @@db_password, })
|
58
|
+
end
|
59
|
+
end # class DBConnection
|
60
|
+
|
61
|
+
|
62
|
+
base = "#{::File.dirname(__FILE__)}/galgal4"
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|