bio-ucsc-api 0.0.1
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.
- data/.document +5 -0
- data/.rspec +2 -0
- data/COPYING +58 -0
- data/COPYING.ja +51 -0
- data/Gemfile +19 -0
- data/Gemfile.lock +49 -0
- data/README.rdoc +57 -0
- data/Rakefile +72 -0
- data/VERSION +1 -0
- data/bio-ucsc-api.gemspec +212 -0
- data/lib/bio-ucsc.rb +20 -0
- data/lib/bio-ucsc/hg18.rb +27 -0
- data/lib/bio-ucsc/hg18/activerecord.rb +166 -0
- data/lib/bio-ucsc/hg18/cnpiafrate2.rb +31 -0
- data/lib/bio-ucsc/hg18/cnplocke.rb +31 -0
- data/lib/bio-ucsc/hg18/cnpredon.rb +32 -0
- data/lib/bio-ucsc/hg18/cnpsebat2.rb +35 -0
- data/lib/bio-ucsc/hg18/cnpsharp2.rb +32 -0
- data/lib/bio-ucsc/hg18/db_connection.rb +61 -0
- data/lib/bio-ucsc/hg18/dgv.rb +27 -0
- data/lib/bio-ucsc/hg18/refgene.rb +27 -0
- data/lib/bio-ucsc/hg18/rmsk.rb +51 -0
- data/lib/bio-ucsc/hg18/tables.rb +142 -0
- data/lib/bio-ucsc/hg19.rb +54 -0
- data/lib/bio-ucsc/hg19/activerecord.rb +217 -0
- data/lib/bio-ucsc/hg19/ccdsgene.rb +33 -0
- data/lib/bio-ucsc/hg19/cytoband.rb +33 -0
- data/lib/bio-ucsc/hg19/db_connection.rb +61 -0
- data/lib/bio-ucsc/hg19/dgv.rb +27 -0
- data/lib/bio-ucsc/hg19/ensgene.rb +21 -0
- data/lib/bio-ucsc/hg19/gwascatalog.rb +26 -0
- data/lib/bio-ucsc/hg19/hapmapalleleschimp.rb +35 -0
- data/lib/bio-ucsc/hg19/hapmapallelesmacaque.rb +35 -0
- data/lib/bio-ucsc/hg19/hapmapsnpsasw.rb +33 -0
- data/lib/bio-ucsc/hg19/hapmapsnpsceu.rb +33 -0
- data/lib/bio-ucsc/hg19/hapmapsnpschb.rb +33 -0
- data/lib/bio-ucsc/hg19/hapmapsnpschd.rb +33 -0
- data/lib/bio-ucsc/hg19/hapmapsnpsgih.rb +34 -0
- data/lib/bio-ucsc/hg19/hapmapsnpsjpt.rb +34 -0
- data/lib/bio-ucsc/hg19/hapmapsnpslwk.rb +35 -0
- data/lib/bio-ucsc/hg19/hapmapsnpsmex.rb +35 -0
- data/lib/bio-ucsc/hg19/hapmapsnpsmkk.rb +35 -0
- data/lib/bio-ucsc/hg19/hapmapsnpstsi.rb +35 -0
- data/lib/bio-ucsc/hg19/hapmapsnpsyri.rb +35 -0
- data/lib/bio-ucsc/hg19/knowngene.rb +34 -0
- data/lib/bio-ucsc/hg19/omimgene.rb +25 -0
- data/lib/bio-ucsc/hg19/phastconselements46wayprimates.rb +27 -0
- data/lib/bio-ucsc/hg19/phylop46wayprimates.rb +27 -0
- data/lib/bio-ucsc/hg19/refgene.rb +27 -0
- data/lib/bio-ucsc/hg19/rmsk.rb +32 -0
- data/lib/bio-ucsc/hg19/snp131.rb +30 -0
- data/lib/bio-ucsc/hg19/snp132.rb +31 -0
- data/lib/bio-ucsc/hg19/snp132codingdbsnp.rb +29 -0
- data/lib/bio-ucsc/hg19/snp132common.rb +32 -0
- data/lib/bio-ucsc/hg19/snp132flagged.rb +31 -0
- data/lib/bio-ucsc/hg19/snp132mult.rb +32 -0
- data/lib/bio-ucsc/hg19/wgrna.rb +29 -0
- data/lib/bio-ucsc/ucsc_bin.rb +148 -0
- data/samples/hg19-sample.rb +66 -0
- data/spec/hg18/cnpiafrate2_spec.rb +23 -0
- data/spec/hg18/cnplocke_spec.rb +23 -0
- data/spec/hg18/cnpredon_spec.rb +23 -0
- data/spec/hg18/cnpsebat2_spec.rb +23 -0
- data/spec/hg18/cnpsharp2_spec.rb +23 -0
- data/spec/hg18/db_connection_spec.rb +36 -0
- data/spec/hg18/dgv_spec.rb +23 -0
- data/spec/hg18/refgene_spec.rb +23 -0
- data/spec/hg18/rmsk_spec.rb +33 -0
- data/spec/hg19/ccdsgene_spec.rb +23 -0
- data/spec/hg19/cytoband_spec.rb +23 -0
- data/spec/hg19/db_connection_spec.rb +37 -0
- data/spec/hg19/dgv_spec.rb +23 -0
- data/spec/hg19/ensgene_spec.rb +23 -0
- data/spec/hg19/gwascatalog_spec.rb +23 -0
- data/spec/hg19/hapmapalleleschimp_spec.rb +23 -0
- data/spec/hg19/hapmapallelesmacaque_spec.rb +23 -0
- data/spec/hg19/hapmapsnpsasw_spec.rb +23 -0
- data/spec/hg19/hapmapsnpsceu_spec.rb +23 -0
- data/spec/hg19/hapmapsnpschb_spec.rb +23 -0
- data/spec/hg19/hapmapsnpschd_spec.rb +23 -0
- data/spec/hg19/hapmapsnpsgih_spec.rb +23 -0
- data/spec/hg19/hapmapsnpsjpt_spec.rb +23 -0
- data/spec/hg19/hapmapsnpslwk_spec.rb +23 -0
- data/spec/hg19/hapmapsnpsmex_spec.rb +23 -0
- data/spec/hg19/hapmapsnpsmkk_spec.rb +23 -0
- data/spec/hg19/hapmapsnpstsi_spec.rb +23 -0
- data/spec/hg19/hapmapsnpsyri_spec.rb +23 -0
- data/spec/hg19/knowngene_spec.rb +23 -0
- data/spec/hg19/omimGene_spec.rb +23 -0
- data/spec/hg19/phastconselements46wayprimates_spec.rb +23 -0
- data/spec/hg19/phyloP46wayPrimates_spec.rb +23 -0
- data/spec/hg19/refgene_spec.rb +23 -0
- data/spec/hg19/rmsk_spec.rb +23 -0
- data/spec/hg19/snp132Flagged_spec.rb +24 -0
- data/spec/hg19/snp132_spec.rb +23 -0
- data/spec/hg19/snp132codingdbsnp_spec.rb +23 -0
- data/spec/hg19/snp132common_spec.rb +24 -0
- data/spec/hg19/snp132mult_spec.rb +23 -0
- data/spec/hg19/wgrna_spec.rb +23 -0
- data/spec/spec_helper.rb +12 -0
- metadata +368 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require 'bio-ucsc'
|
|
2
|
+
describe "Bio::Ucsc::Hg18::CnpSebat2" do
|
|
3
|
+
|
|
4
|
+
describe "#find_by_interval" do
|
|
5
|
+
context "given range chr1:1-20,000,000" do
|
|
6
|
+
it "returns an array of results" do
|
|
7
|
+
Bio::Ucsc::Hg18::DBConnection.default
|
|
8
|
+
Bio::Ucsc::Hg18::DBConnection.connect
|
|
9
|
+
i = Bio::GenomicInterval.parse("chr1:1-20,000,000")
|
|
10
|
+
Bio::Ucsc::Hg18::CnpSebat2.find_by_interval(i).should have(1).items
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
it "returns an array of results with column accessors" do
|
|
14
|
+
Bio::Ucsc::Hg18::DBConnection.default
|
|
15
|
+
Bio::Ucsc::Hg18::DBConnection.connect
|
|
16
|
+
i = Bio::GenomicInterval.parse("chr1:1-20,000,000")
|
|
17
|
+
r = Bio::Ucsc::Hg18::CnpSebat2.find_by_interval(i)
|
|
18
|
+
r[0].chrom.should == "chr1"
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require 'bio-ucsc'
|
|
2
|
+
describe "Bio::Ucsc::Hg18::CnpSharp2" do
|
|
3
|
+
|
|
4
|
+
describe "#find_by_interval" do
|
|
5
|
+
context "given range chr1:1-2,000,000" do
|
|
6
|
+
it "returns an array of results" do
|
|
7
|
+
Bio::Ucsc::Hg18::DBConnection.default
|
|
8
|
+
Bio::Ucsc::Hg18::DBConnection.connect
|
|
9
|
+
i = Bio::GenomicInterval.parse("chr1:1-2,000,000")
|
|
10
|
+
Bio::Ucsc::Hg18::CnpSharp2.find_by_interval(i).should have(1).items
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
it "returns an array of results with column accessors" do
|
|
14
|
+
Bio::Ucsc::Hg18::DBConnection.default
|
|
15
|
+
Bio::Ucsc::Hg18::DBConnection.connect
|
|
16
|
+
i = Bio::GenomicInterval.parse("chr1:1-2,000,000")
|
|
17
|
+
r = Bio::Ucsc::Hg18::CnpSharp2.find_by_interval(i)
|
|
18
|
+
r[0].chrom.should == "chr1"
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#
|
|
2
|
+
# = /spec/db_connection_spec.rb - Rspec specification for Ucsc::Hg18
|
|
3
|
+
#
|
|
4
|
+
# Copyright:: Cioyrught (C) 2011
|
|
5
|
+
# MISHIMA, Hiroyuki <missy at be.to / hmishima at nagasaki-u.ac.jp>
|
|
6
|
+
# License:: Ruby licence (Ryby's / GPLv2 dual)
|
|
7
|
+
|
|
8
|
+
require 'bio-ucsc'
|
|
9
|
+
describe "Bio::Ucsc::Hg18::DBConnection" do
|
|
10
|
+
|
|
11
|
+
describe ".new" do
|
|
12
|
+
context "given no argument" do
|
|
13
|
+
it "establishs the hg19 connection without exceptions" do
|
|
14
|
+
expect{Bio::Ucsc::Hg18::DBConnection.connect}.not_to raise_error
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
describe ".db_host" do
|
|
20
|
+
context "given no atgument" do
|
|
21
|
+
it "returns the default" do
|
|
22
|
+
Bio::Ucsc::Hg18::DBConnection.db_host.should == "genome-mysql.cse.ucsc.edu"
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
describe ".db_host=" do
|
|
28
|
+
context 'given ="localhost"' do
|
|
29
|
+
it "changes default hostname" do
|
|
30
|
+
Bio::Ucsc::Hg18::DBConnection.db_host = "localhost"
|
|
31
|
+
Bio::Ucsc::Hg18::DBConnection.db_host.should == "localhost"
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require 'bio-ucsc'
|
|
2
|
+
describe "Bio::Ucsc::Hg18::Dgv" do
|
|
3
|
+
|
|
4
|
+
describe "#find_by_interval" do
|
|
5
|
+
context "given range chr1:1-20000" do
|
|
6
|
+
it "returens an array of results" do
|
|
7
|
+
Bio::Ucsc::Hg18::DBConnection.default
|
|
8
|
+
Bio::Ucsc::Hg18::DBConnection.connect
|
|
9
|
+
i = Bio::GenomicInterval.parse("chr1:1-20000")
|
|
10
|
+
Bio::Ucsc::Hg18::Dgv.find_by_interval(i).should have(11).items
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
it "returens an array of results with column accessors" do
|
|
14
|
+
Bio::Ucsc::Hg18::DBConnection.default
|
|
15
|
+
Bio::Ucsc::Hg18::DBConnection.connect
|
|
16
|
+
i = Bio::GenomicInterval.parse("chr1:1-20000")
|
|
17
|
+
r = Bio::Ucsc::Hg18::Dgv.find_by_interval(i)
|
|
18
|
+
r[0].chrom.should == "chr1"
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require 'bio-ucsc'
|
|
2
|
+
describe "Bio::Ucsc::Hg18::RefGene" do
|
|
3
|
+
|
|
4
|
+
describe "#find_by_interval" do
|
|
5
|
+
context "given range chr1:1-100,000" do
|
|
6
|
+
it "returens an array of results" do
|
|
7
|
+
Bio::Ucsc::Hg18::DBConnection.default
|
|
8
|
+
Bio::Ucsc::Hg18::DBConnection.connect
|
|
9
|
+
i = Bio::GenomicInterval.parse("chr1:1-100,000")
|
|
10
|
+
Bio::Ucsc::Hg18::RefGene.find_by_interval(i).should have(5).items
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
it "returens an array of results with column accessors" do
|
|
14
|
+
Bio::Ucsc::Hg18::DBConnection.default
|
|
15
|
+
Bio::Ucsc::Hg18::DBConnection.connect
|
|
16
|
+
i = Bio::GenomicInterval.parse("chr1:1-100,000")
|
|
17
|
+
r = Bio::Ucsc::Hg18::RefGene.find_by_interval(i)
|
|
18
|
+
r[0].chrom.should == "chr1"
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
require 'bio-ucsc'
|
|
2
|
+
describe "Bio::Ucsc::Hg18::Rmsk" do
|
|
3
|
+
|
|
4
|
+
describe "::Chr1_Rmsk#find_by_interval" do
|
|
5
|
+
context "given range chr1:1-10,000" do
|
|
6
|
+
it "returens an array of results" do
|
|
7
|
+
Bio::Ucsc::Hg18::DBConnection.default
|
|
8
|
+
Bio::Ucsc::Hg18::DBConnection.connect
|
|
9
|
+
i = Bio::GenomicInterval.parse("chr1:1-10,000")
|
|
10
|
+
Bio::Ucsc::Hg18::Rmsk::Chr1_Rmsk.find_by_interval(i).should have(8).items
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
describe "#find_by_interval" do
|
|
16
|
+
context "given range chr3:1-100,000" do
|
|
17
|
+
it "returens an array of results" do
|
|
18
|
+
Bio::Ucsc::Hg18::DBConnection.default
|
|
19
|
+
Bio::Ucsc::Hg18::DBConnection.connect
|
|
20
|
+
i = Bio::GenomicInterval.parse("chr3:1-100,000")
|
|
21
|
+
Bio::Ucsc::Hg18::Rmsk.find_by_interval(i).should have(126).items
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
it "returens an array of results with column accessors" do
|
|
25
|
+
Bio::Ucsc::Hg18::DBConnection.default
|
|
26
|
+
Bio::Ucsc::Hg18::DBConnection.connect
|
|
27
|
+
i = Bio::GenomicInterval.parse("chr3:1-100,000")
|
|
28
|
+
r = Bio::Ucsc::Hg18::Rmsk.find_by_interval(i)
|
|
29
|
+
r[0].genoName.should == "chr3"
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require 'bio-ucsc'
|
|
2
|
+
describe "Bio::Ucsc::Hg19::CcdsGene" do
|
|
3
|
+
|
|
4
|
+
describe "#find_by_interval" do
|
|
5
|
+
context "given range chr1:1-1,000,000" do
|
|
6
|
+
it "returens an array of results" do
|
|
7
|
+
Bio::Ucsc::Hg19::DBConnection.default
|
|
8
|
+
Bio::Ucsc::Hg19::DBConnection.connect
|
|
9
|
+
i = Bio::GenomicInterval.parse("chr1:1-1,000,000")
|
|
10
|
+
Bio::Ucsc::Hg19::RefGene.find_by_interval(i).should have(29).items
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
it "returens an array of results with column accessors" do
|
|
14
|
+
Bio::Ucsc::Hg19::DBConnection.default
|
|
15
|
+
Bio::Ucsc::Hg19::DBConnection.connect
|
|
16
|
+
i = Bio::GenomicInterval.parse("chr1:1-1,000,000")
|
|
17
|
+
r = Bio::Ucsc::Hg19::RefGene.find_by_interval(i)
|
|
18
|
+
r[0].chrom.should == "chr1"
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require 'bio-ucsc'
|
|
2
|
+
describe "Bio::Ucsc::Hg19::CytoBand" do
|
|
3
|
+
|
|
4
|
+
describe "#find_by_INTERVAL" do
|
|
5
|
+
context "given range chr1:1-5,000,000" do
|
|
6
|
+
it "returens an array of results" do
|
|
7
|
+
Bio::Ucsc::Hg19::DBConnection.default
|
|
8
|
+
Bio::Ucsc::Hg19::DBConnection.connect
|
|
9
|
+
i = Bio::GenomicInterval.parse("chr1:1-5,000,000")
|
|
10
|
+
Bio::Ucsc::Hg19::CytoBand.find_by_interval(i).should have(2).items
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
it "returens an array of results with column accessors" do
|
|
14
|
+
Bio::Ucsc::Hg19::DBConnection.default
|
|
15
|
+
Bio::Ucsc::Hg19::DBConnection.connect
|
|
16
|
+
i = Bio::GenomicInterval.parse("chr1:1-5,000,000")
|
|
17
|
+
r = Bio::Ucsc::Hg19::CytoBand.find_by_interval(i)
|
|
18
|
+
r[0].chrom.should == "chr1"
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#
|
|
2
|
+
# = /spec/hg19_spec.rb - Rspec specification for Ucsc::Hg19
|
|
3
|
+
#
|
|
4
|
+
# Copyright:: Cioyrught (C) 2011
|
|
5
|
+
# MISHIMA, Hiroyuki <missy at be.to / hmishima at nagasaki-u.ac.jp>
|
|
6
|
+
# License:: Ruby licence (Ryby's / GPLv2 dual)
|
|
7
|
+
|
|
8
|
+
require 'bio-ucsc'
|
|
9
|
+
|
|
10
|
+
describe "Bio::Ucsc::Hg19::DBConnection" do
|
|
11
|
+
|
|
12
|
+
describe ".new" do
|
|
13
|
+
context "given no argument" do
|
|
14
|
+
it "establishs the hg19 connection without exceptions" do
|
|
15
|
+
expect{Bio::Ucsc::Hg19::DBConnection.connect}.not_to raise_error
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
describe ".db_host" do
|
|
21
|
+
context "given no atgument" do
|
|
22
|
+
it "returns the default" do
|
|
23
|
+
Bio::Ucsc::Hg19::DBConnection.db_host.should == "genome-mysql.cse.ucsc.edu"
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
describe ".db_host=" do
|
|
29
|
+
context 'given ="localhost"' do
|
|
30
|
+
it "changes default hostname" do
|
|
31
|
+
Bio::Ucsc::Hg19::DBConnection.db_host = "localhost"
|
|
32
|
+
Bio::Ucsc::Hg19::DBConnection.db_host.should == "localhost"
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require 'bio-ucsc'
|
|
2
|
+
describe "Bio::Ucsc::Hg19::Dgv" do
|
|
3
|
+
|
|
4
|
+
describe "#find_by_interval" do
|
|
5
|
+
context "given range chr1:1-20,000" do
|
|
6
|
+
it "returens an array of results" do
|
|
7
|
+
Bio::Ucsc::Hg19::DBConnection.default
|
|
8
|
+
Bio::Ucsc::Hg19::DBConnection.connect
|
|
9
|
+
s = Bio::GenomicInterval.parse("chr1:1-20,000")
|
|
10
|
+
Bio::Ucsc::Hg19::Dgv.find_by_interval(s).should have(9).items
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
it "returens an array of results with column accessors" do
|
|
14
|
+
Bio::Ucsc::Hg19::DBConnection.default
|
|
15
|
+
Bio::Ucsc::Hg19::DBConnection.connect
|
|
16
|
+
s = Bio::GenomicInterval.parse("chr1:1-20,000")
|
|
17
|
+
r = Bio::Ucsc::Hg19::Dgv.find_by_interval(s)
|
|
18
|
+
r[0].chrom.should == "chr1"
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require 'bio-ucsc'
|
|
2
|
+
describe "Bio::Ucsc::Hg19::EnsGene" do
|
|
3
|
+
|
|
4
|
+
describe "#find_by_interval" do
|
|
5
|
+
context "given range chr1:1-500,000" do
|
|
6
|
+
it "returens an array of results" do
|
|
7
|
+
Bio::Ucsc::Hg19::DBConnection.default
|
|
8
|
+
Bio::Ucsc::Hg19::DBConnection.connect
|
|
9
|
+
i = Bio::GenomicInterval.parse("chr1:1-500,000")
|
|
10
|
+
Bio::Ucsc::Hg19::EnsGene.find_by_interval(i).should have(60).items
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
it "returens an array of results with column accessors" do
|
|
14
|
+
Bio::Ucsc::Hg19::DBConnection.default
|
|
15
|
+
Bio::Ucsc::Hg19::DBConnection.connect
|
|
16
|
+
i = Bio::GenomicInterval.parse("chr1:1-500,000")
|
|
17
|
+
r = Bio::Ucsc::Hg19::EnsGene.find_by_interval(i)
|
|
18
|
+
r[0].chrom.should == "chr1"
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require 'bio-ucsc'
|
|
2
|
+
describe "Bio::Ucsc::Hg19::GwasCatalog" do
|
|
3
|
+
|
|
4
|
+
describe "#find_by_interval" do
|
|
5
|
+
context "given range chr1:1-5,000,000" do
|
|
6
|
+
it "returens an array of results" do
|
|
7
|
+
Bio::Ucsc::Hg19::DBConnection.default
|
|
8
|
+
Bio::Ucsc::Hg19::DBConnection.connect
|
|
9
|
+
i = Bio::GenomicInterval.parse("chr1:1-5,000,000")
|
|
10
|
+
Bio::Ucsc::Hg19::GwasCatalog.find_by_interval(i).should have(8).items
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
it "returens an array of results with column accessors" do
|
|
14
|
+
Bio::Ucsc::Hg19::DBConnection.default
|
|
15
|
+
Bio::Ucsc::Hg19::DBConnection.connect
|
|
16
|
+
i = Bio::GenomicInterval.parse("chr1:1-5,000,000")
|
|
17
|
+
r = Bio::Ucsc::Hg19::GwasCatalog.find_by_interval(i)
|
|
18
|
+
r[0].chrom.should == "chr1"
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require 'bio-ucsc'
|
|
2
|
+
describe "Bio::Ucsc::Hg19::HapMapAllelesChimp" do
|
|
3
|
+
|
|
4
|
+
describe "#find_by_interval" do
|
|
5
|
+
context "given range chr1:1-600,000" do
|
|
6
|
+
it "returens an array of results" do
|
|
7
|
+
Bio::Ucsc::Hg19::DBConnection.default
|
|
8
|
+
Bio::Ucsc::Hg19::DBConnection.connect
|
|
9
|
+
i = Bio::GenomicInterval.parse("chr1:1-600,000")
|
|
10
|
+
Bio::Ucsc::Hg19::HapMapAllelesChimp.find_by_interval(i).should have(48).items
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
it "returens an array of results with column accessors" do
|
|
14
|
+
Bio::Ucsc::Hg19::DBConnection.default
|
|
15
|
+
Bio::Ucsc::Hg19::DBConnection.connect
|
|
16
|
+
i = Bio::GenomicInterval.parse("chr1:1-600,000")
|
|
17
|
+
r = Bio::Ucsc::Hg19::HapMapAllelesChimp.find_by_interval(i)
|
|
18
|
+
r[0].chrom.should == "chr1"
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require 'bio-ucsc'
|
|
2
|
+
describe "Bio::Ucsc::Hg19::HapMapAllelesMacaque" do
|
|
3
|
+
|
|
4
|
+
describe "#find_by_interval" do
|
|
5
|
+
context "given range chr1:1-600,000" do
|
|
6
|
+
it "returens an array of results" do
|
|
7
|
+
Bio::Ucsc::Hg19::DBConnection.default
|
|
8
|
+
Bio::Ucsc::Hg19::DBConnection.connect
|
|
9
|
+
i = Bio::GenomicInterval.parse("chr1:1-600,000")
|
|
10
|
+
Bio::Ucsc::Hg19::HapMapAllelesMacaque.find_by_interval(i).should have(49).items
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
it "returens an array of results with column accessors" do
|
|
14
|
+
Bio::Ucsc::Hg19::DBConnection.default
|
|
15
|
+
Bio::Ucsc::Hg19::DBConnection.connect
|
|
16
|
+
i = Bio::GenomicInterval.parse("chr1:1-600,000")
|
|
17
|
+
r = Bio::Ucsc::Hg19::HapMapAllelesMacaque.find_by_interval(i)
|
|
18
|
+
r[0].chrom.should == "chr1"
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require 'bio-ucsc'
|
|
2
|
+
describe "Bio::Ucsc::Hg19::HapMapSnpsASW" do
|
|
3
|
+
|
|
4
|
+
describe "#find_by_interval" do
|
|
5
|
+
context "given range chr1:1-800,000" do
|
|
6
|
+
it "returens an array of results" do
|
|
7
|
+
Bio::Ucsc::Hg19::DBConnection.default
|
|
8
|
+
Bio::Ucsc::Hg19::DBConnection.connect
|
|
9
|
+
i = Bio::GenomicInterval.parse("chr1:1-800,000")
|
|
10
|
+
Bio::Ucsc::Hg19::HapMapSnpsASW.find_by_interval(i).should have(22).items
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
it "returens an array of results with column accessors" do
|
|
14
|
+
Bio::Ucsc::Hg19::DBConnection.default
|
|
15
|
+
Bio::Ucsc::Hg19::DBConnection.connect
|
|
16
|
+
i = Bio::GenomicInterval.parse("chr1:1-800,000")
|
|
17
|
+
r = Bio::Ucsc::Hg19::HapMapSnpsASW.find_by_interval(i)
|
|
18
|
+
r[0].chrom.should == "chr1"
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require 'bio-ucsc'
|
|
2
|
+
describe "Bio::Ucsc::Hg19::HapMapSnpsCEU" do
|
|
3
|
+
|
|
4
|
+
describe "#find_by_interval" do
|
|
5
|
+
context "given range chr1:1-600,000" do
|
|
6
|
+
it "returens an array of results" do
|
|
7
|
+
Bio::Ucsc::Hg19::DBConnection.default
|
|
8
|
+
Bio::Ucsc::Hg19::DBConnection.connect
|
|
9
|
+
i = Bio::GenomicInterval.parse("chr1:1-600,000")
|
|
10
|
+
Bio::Ucsc::Hg19::HapMapSnpsCEU.find_by_interval(i).should have(41).items
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
it "returens an array of results with column accessors" do
|
|
14
|
+
Bio::Ucsc::Hg19::DBConnection.default
|
|
15
|
+
Bio::Ucsc::Hg19::DBConnection.connect
|
|
16
|
+
i = Bio::GenomicInterval.parse("chr1:1-600,000")
|
|
17
|
+
r = Bio::Ucsc::Hg19::HapMapSnpsCEU.find_by_interval(i)
|
|
18
|
+
r[0].chrom.should == "chr1"
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require 'bio-ucsc'
|
|
2
|
+
describe "Bio::Ucsc::Hg19::HapMapSnpsCHB" do
|
|
3
|
+
|
|
4
|
+
describe "#find_by_interval" do
|
|
5
|
+
context "given range chr1:1-600,000" do
|
|
6
|
+
it "returens an array of results" do
|
|
7
|
+
Bio::Ucsc::Hg19::DBConnection.default
|
|
8
|
+
Bio::Ucsc::Hg19::DBConnection.connect
|
|
9
|
+
i = Bio::GenomicInterval.parse("chr1:1-600,000")
|
|
10
|
+
Bio::Ucsc::Hg19::HapMapSnpsCHB.find_by_interval(i).should have(44).items
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
it "returens an array of results with column accessors" do
|
|
14
|
+
Bio::Ucsc::Hg19::DBConnection.default
|
|
15
|
+
Bio::Ucsc::Hg19::DBConnection.connect
|
|
16
|
+
i = Bio::GenomicInterval.parse("chr1:1-600,000")
|
|
17
|
+
r = Bio::Ucsc::Hg19::HapMapSnpsCHB.find_by_interval(i)
|
|
18
|
+
r[0].chrom.should == "chr1"
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
end
|