bio-ucsc-api 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- 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::Hg19::HapMapSnpsCHD" 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::HapMapSnpsCHD.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::Hg19::DBConnection.default
|
15
|
+
Bio::Ucsc::Hg19::DBConnection.connect
|
16
|
+
i = Bio::GenomicInterval.parse("chr1:1-600,000")
|
17
|
+
r = Bio::Ucsc::Hg19::HapMapSnpsCHD.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::HapMapSnpsGIH" 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::HapMapSnpsGIH.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-600,000")
|
17
|
+
r = Bio::Ucsc::Hg19::HapMapSnpsGIH.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::HapMapSnpsJPT" 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::HapMapSnpsJPT.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::HapMapSnpsJPT.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::HapMapSnpsLWK" 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::HapMapSnpsLWK.find_by_interval(i).should have(3).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::HapMapSnpsLWK.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::HapMapSnpsMEX" 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::HapMapSnpsMEX.find_by_interval(i).should have(1).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::HapMapSnpsMEX.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::HapMapSnpsMKK" 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::HapMapSnpsMKK.find_by_interval(i).should have(3).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::HapMapSnpsMKK.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::HapMapSnpsTSI" 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::HapMapSnpsTSI.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-600,000")
|
17
|
+
r = Bio::Ucsc::Hg19::HapMapSnpsTSI.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::HapMapSnpsYRI" 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::HapMapSnpsYRI.find_by_interval(i).should have(45).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::HapMapSnpsYRI.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::KnownGene" 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::Hg19::DBConnection.default
|
8
|
+
Bio::Ucsc::Hg19::DBConnection.connect
|
9
|
+
i = Bio::GenomicInterval.parse("chr1:1-20000")
|
10
|
+
Bio::Ucsc::Hg19::KnownGene.find_by_interval(i).should have(24).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-20000")
|
17
|
+
r = Bio::Ucsc::Hg19::KnownGene.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::OmimGene" 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::OmimGene.find_by_interval(i).should have(4).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::OmimGene.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::PhastConsElements46wayPrimates" do
|
3
|
+
|
4
|
+
describe "#find_by_interval" do
|
5
|
+
context "given range chr1:1-80,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-80,000")
|
10
|
+
Bio::Ucsc::Hg19::PhastConsElements46wayPrimates.find_by_interval(i).should have(4).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-80,000")
|
17
|
+
r = Bio::Ucsc::Hg19::PhastConsElements46wayPrimates.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::PhyloP46wayPrimates" do
|
3
|
+
|
4
|
+
describe "#find_by_interval" do
|
5
|
+
context "given range chr1:1-50,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-50,000")
|
10
|
+
Bio::Ucsc::Hg19::PhyloP46wayPrimates.find_by_interval(i).should have(39).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-50,000")
|
17
|
+
r = Bio::Ucsc::Hg19::PhyloP46wayPrimates.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::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::Hg19::DBConnection.default
|
8
|
+
Bio::Ucsc::Hg19::DBConnection.connect
|
9
|
+
i = Bio::GenomicInterval.parse("chr1:1-100,000")
|
10
|
+
Bio::Ucsc::Hg19::RefGene.find_by_interval(i).should have(4).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-100,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::Rmsk" 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::Hg19::DBConnection.default
|
8
|
+
Bio::Ucsc::Hg19::DBConnection.connect
|
9
|
+
i = Bio::GenomicInterval.parse("chr1:1-100,000")
|
10
|
+
Bio::Ucsc::Hg19::Rmsk.find_by_interval(i).should have(146).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-100,000")
|
17
|
+
r = Bio::Ucsc::Hg19::Rmsk.find_by_interval(i)
|
18
|
+
r[0].genoName.should == "chr1"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'bio-ucsc'
|
2
|
+
describe "Bio::Ucsc::Hg19::Snp132Flagged" do
|
3
|
+
|
4
|
+
describe "#find_by_interval" do
|
5
|
+
context "given range chr1:1-2,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-2,000,000")
|
10
|
+
Bio::Ucsc::Hg19::Snp132Flagged.find_by_interval(i).should have(3).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-2,000,000")
|
17
|
+
r = Bio::Ucsc::Hg19::Snp132Flagged.find_by_interval(i)
|
18
|
+
r[0].chrom.should == "chr1"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'bio-ucsc'
|
2
|
+
describe "Bio::Ucsc::Hg19::Snp132" do
|
3
|
+
|
4
|
+
describe "#find_by_interval" do
|
5
|
+
context "given range chr1:1-12,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-12,000")
|
10
|
+
Bio::Ucsc::Hg19::Snp132.find_by_interval(i).should have(67).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-12,000")
|
17
|
+
r = Bio::Ucsc::Hg19::Snp132.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::Snp132CodingDbSnp" do
|
3
|
+
|
4
|
+
describe "#find_by_interval" do
|
5
|
+
context "given range chr1:1-50,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-50,000")
|
10
|
+
Bio::Ucsc::Hg19::Snp132CodingDbSnp.find_by_interval(i).should have(23).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-50,000")
|
17
|
+
r = Bio::Ucsc::Hg19::Snp132CodingDbSnp.find_by_interval(i)
|
18
|
+
r[0].chrom.should == "chr1"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'bio-ucsc'
|
2
|
+
describe "Bio::Ucsc::Hg19::Snp132Common" 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::Hg19::DBConnection.default
|
8
|
+
Bio::Ucsc::Hg19::DBConnection.connect
|
9
|
+
i = Bio::GenomicInterval.parse("chr1:1-20000")
|
10
|
+
Bio::Ucsc::Hg19::Snp132Common.find_by_interval(i).should have(4).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-20000")
|
17
|
+
r = Bio::Ucsc::Hg19::Snp132Common.find_by_interval(i)
|
18
|
+
r[0].chrom.should == "chr1"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|