Skip to content

Commit

Permalink
Add UCSC reference genomes
Browse files Browse the repository at this point in the history
  • Loading branch information
kojix2 committed Jan 12, 2023
1 parent d2e102c commit 246e08c
Show file tree
Hide file tree
Showing 102 changed files with 1,703 additions and 17 deletions.
18 changes: 2 additions & 16 deletions lib/bio/twobit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,6 @@ def open(*args, **kwargs)
end
file
end

# Here, const_missing is used instead of autoload.

def const_missing(name)
# prevents const_get from being called recursively many times.
@missing_const ||= []
super if @missing_const.include? name
@missing_const << name

path = File.join(__dir__, "twobit/references", "#{name.to_s.downcase}.rb")
if File.exist?(path)
require path
return const_get(name)
end
super
end
end

def initialize(fname, masked: false)
Expand Down Expand Up @@ -117,3 +101,5 @@ def download(output_path, url)
end
end
end

Dir[__dir__ + "/twobit/references/*.rb"].each { |file| require file }
16 changes: 16 additions & 0 deletions lib/bio/twobit/references/ailmel1.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require_relative "../reference_genome"

module Bio
class TwoBit
class AilMel1 < ReferenceGenome
def initialize(**kwargs)
@metadata = Metadata.new
@metadata.id = "ailMel1"
@metadata.name = "ailMel1"
@metadata.url = "https://hgdownload.soe.ucsc.edu/downloads.html"
@data_url = "https://hgdownload.soe.ucsc.edu/goldenPath/ailMel1/bigZips/ailMel1.2bit"
super(**kwargs)
end
end
end
end
16 changes: 16 additions & 0 deletions lib/bio/twobit/references/allmis1.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require_relative "../reference_genome"

module Bio
class TwoBit
class AllMis1 < ReferenceGenome
def initialize(**kwargs)
@metadata = Metadata.new
@metadata.id = "allMis1"
@metadata.name = "allMis1"
@metadata.url = "https://hgdownload.soe.ucsc.edu/downloads.html"
@data_url = "https://hgdownload.soe.ucsc.edu/goldenPath/allMis1/bigZips/allMis1.2bit"
super(**kwargs)
end
end
end
end
16 changes: 16 additions & 0 deletions lib/bio/twobit/references/anocar2.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require_relative "../reference_genome"

module Bio
class TwoBit
class AnoCar2 < ReferenceGenome
def initialize(**kwargs)
@metadata = Metadata.new
@metadata.id = "anoCar2"
@metadata.name = "anoCar2"
@metadata.url = "https://hgdownload.soe.ucsc.edu/downloads.html"
@data_url = "https://hgdownload.soe.ucsc.edu/goldenPath/anoCar2/bigZips/anoCar2.2bit"
super(**kwargs)
end
end
end
end
16 changes: 16 additions & 0 deletions lib/bio/twobit/references/anogam3.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require_relative "../reference_genome"

module Bio
class TwoBit
class AnoGam3 < ReferenceGenome
def initialize(**kwargs)
@metadata = Metadata.new
@metadata.id = "anoGam3"
@metadata.name = "anoGam3"
@metadata.url = "https://hgdownload.soe.ucsc.edu/downloads.html"
@data_url = "https://hgdownload.soe.ucsc.edu/goldenPath/anoGam3/bigZips/anoGam3.2bit"
super(**kwargs)
end
end
end
end
16 changes: 16 additions & 0 deletions lib/bio/twobit/references/apimel2.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require_relative "../reference_genome"

module Bio
class TwoBit
class ApiMel2 < ReferenceGenome
def initialize(**kwargs)
@metadata = Metadata.new
@metadata.id = "apiMel2"
@metadata.name = "apiMel2"
@metadata.url = "https://hgdownload.soe.ucsc.edu/downloads.html"
@data_url = "https://hgdownload.soe.ucsc.edu/goldenPath/apiMel2/bigZips/apiMel2.2bit"
super(**kwargs)
end
end
end
end
16 changes: 16 additions & 0 deletions lib/bio/twobit/references/aplcal1.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require_relative "../reference_genome"

module Bio
class TwoBit
class AplCal1 < ReferenceGenome
def initialize(**kwargs)
@metadata = Metadata.new
@metadata.id = "aplCal1"
@metadata.name = "aplCal1"
@metadata.url = "https://hgdownload.soe.ucsc.edu/downloads.html"
@data_url = "https://hgdownload.soe.ucsc.edu/goldenPath/aplCal1/bigZips/aplCal1.2bit"
super(**kwargs)
end
end
end
end
16 changes: 16 additions & 0 deletions lib/bio/twobit/references/aptman1.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require_relative "../reference_genome"

module Bio
class TwoBit
class AptMan1 < ReferenceGenome
def initialize(**kwargs)
@metadata = Metadata.new
@metadata.id = "aptMan1"
@metadata.name = "aptMan1"
@metadata.url = "https://hgdownload.soe.ucsc.edu/downloads.html"
@data_url = "https://hgdownload.soe.ucsc.edu/goldenPath/aptMan1/bigZips/aptMan1.2bit"
super(**kwargs)
end
end
end
end
16 changes: 16 additions & 0 deletions lib/bio/twobit/references/aquchr2.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require_relative "../reference_genome"

module Bio
class TwoBit
class AquChr2 < ReferenceGenome
def initialize(**kwargs)
@metadata = Metadata.new
@metadata.id = "aquChr2"
@metadata.name = "aquChr2"
@metadata.url = "https://hgdownload.soe.ucsc.edu/downloads.html"
@data_url = "https://hgdownload.soe.ucsc.edu/goldenPath/aquChr2/bigZips/aquChr2.2bit"
super(**kwargs)
end
end
end
end
16 changes: 16 additions & 0 deletions lib/bio/twobit/references/balacu1.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require_relative "../reference_genome"

module Bio
class TwoBit
class BalAcu1 < ReferenceGenome
def initialize(**kwargs)
@metadata = Metadata.new
@metadata.id = "balAcu1"
@metadata.name = "balAcu1"
@metadata.url = "https://hgdownload.soe.ucsc.edu/downloads.html"
@data_url = "https://hgdownload.soe.ucsc.edu/goldenPath/balAcu1/bigZips/balAcu1.2bit"
super(**kwargs)
end
end
end
end
16 changes: 16 additions & 0 deletions lib/bio/twobit/references/bostau7.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require_relative "../reference_genome"

module Bio
class TwoBit
class BosTau7 < ReferenceGenome
def initialize(**kwargs)
@metadata = Metadata.new
@metadata.id = "bosTau7"
@metadata.name = "bosTau7"
@metadata.url = "https://hgdownload.soe.ucsc.edu/downloads.html"
@data_url = "https://hgdownload.soe.ucsc.edu/goldenPath/bosTau7/bigZips/bosTau7.2bit"
super(**kwargs)
end
end
end
end
16 changes: 16 additions & 0 deletions lib/bio/twobit/references/braflo1.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require_relative "../reference_genome"

module Bio
class TwoBit
class BraFlo1 < ReferenceGenome
def initialize(**kwargs)
@metadata = Metadata.new
@metadata.id = "braFlo1"
@metadata.name = "braFlo1"
@metadata.url = "https://hgdownload.soe.ucsc.edu/downloads.html"
@data_url = "https://hgdownload.soe.ucsc.edu/goldenPath/braFlo1/bigZips/braFlo1.2bit"
super(**kwargs)
end
end
end
end
16 changes: 16 additions & 0 deletions lib/bio/twobit/references/caejap1.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require_relative "../reference_genome"

module Bio
class TwoBit
class CaeJap1 < ReferenceGenome
def initialize(**kwargs)
@metadata = Metadata.new
@metadata.id = "caeJap1"
@metadata.name = "caeJap1"
@metadata.url = "https://hgdownload.soe.ucsc.edu/downloads.html"
@data_url = "https://hgdownload.soe.ucsc.edu/goldenPath/caeJap1/bigZips/caeJap1.2bit"
super(**kwargs)
end
end
end
end
16 changes: 16 additions & 0 deletions lib/bio/twobit/references/caepb2.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require_relative "../reference_genome"

module Bio
class TwoBit
class CaePb2 < ReferenceGenome
def initialize(**kwargs)
@metadata = Metadata.new
@metadata.id = "caePb2"
@metadata.name = "caePb2"
@metadata.url = "https://hgdownload.soe.ucsc.edu/downloads.html"
@data_url = "https://hgdownload.soe.ucsc.edu/goldenPath/caePb2/bigZips/caePb2.2bit"
super(**kwargs)
end
end
end
end
16 changes: 16 additions & 0 deletions lib/bio/twobit/references/caerem3.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require_relative "../reference_genome"

module Bio
class TwoBit
class CaeRem3 < ReferenceGenome
def initialize(**kwargs)
@metadata = Metadata.new
@metadata.id = "caeRem3"
@metadata.name = "caeRem3"
@metadata.url = "https://hgdownload.soe.ucsc.edu/downloads.html"
@data_url = "https://hgdownload.soe.ucsc.edu/goldenPath/caeRem3/bigZips/caeRem3.2bit"
super(**kwargs)
end
end
end
end
16 changes: 16 additions & 0 deletions lib/bio/twobit/references/caljac4.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require_relative "../reference_genome"

module Bio
class TwoBit
class CalJac4 < ReferenceGenome
def initialize(**kwargs)
@metadata = Metadata.new
@metadata.id = "calJac4"
@metadata.name = "calJac4"
@metadata.url = "https://hgdownload.soe.ucsc.edu/downloads.html"
@data_url = "https://hgdownload.soe.ucsc.edu/goldenPath/calJac4/bigZips/calJac4.2bit"
super(**kwargs)
end
end
end
end
16 changes: 16 additions & 0 deletions lib/bio/twobit/references/calmil1.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require_relative "../reference_genome"

module Bio
class TwoBit
class CalMil1 < ReferenceGenome
def initialize(**kwargs)
@metadata = Metadata.new
@metadata.id = "calMil1"
@metadata.name = "calMil1"
@metadata.url = "https://hgdownload.soe.ucsc.edu/downloads.html"
@data_url = "https://hgdownload.soe.ucsc.edu/goldenPath/calMil1/bigZips/calMil1.2bit"
super(**kwargs)
end
end
end
end
16 changes: 16 additions & 0 deletions lib/bio/twobit/references/canfam4.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require_relative "../reference_genome"

module Bio
class TwoBit
class CanFam4 < ReferenceGenome
def initialize(**kwargs)
@metadata = Metadata.new
@metadata.id = "canFam4"
@metadata.name = "canFam4"
@metadata.url = "https://hgdownload.soe.ucsc.edu/downloads.html"
@data_url = "https://hgdownload.soe.ucsc.edu/goldenPath/canFam4/bigZips/canFam4.2bit"
super(**kwargs)
end
end
end
end
16 changes: 16 additions & 0 deletions lib/bio/twobit/references/canfam6.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require_relative "../reference_genome"

module Bio
class TwoBit
class CanFam6 < ReferenceGenome
def initialize(**kwargs)
@metadata = Metadata.new
@metadata.id = "canFam6"
@metadata.name = "canFam6"
@metadata.url = "https://hgdownload.soe.ucsc.edu/downloads.html"
@data_url = "https://hgdownload.soe.ucsc.edu/goldenPath/canFam6/bigZips/canFam6.2bit"
super(**kwargs)
end
end
end
end
16 changes: 16 additions & 0 deletions lib/bio/twobit/references/cb3.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require_relative "../reference_genome"

module Bio
class TwoBit
class Cb3 < ReferenceGenome
def initialize(**kwargs)
@metadata = Metadata.new
@metadata.id = "cb3"
@metadata.name = "cb3"
@metadata.url = "https://hgdownload.soe.ucsc.edu/downloads.html"
@data_url = "https://hgdownload.soe.ucsc.edu/goldenPath/cb3/bigZips/cb3.2bit"
super(**kwargs)
end
end
end
end
16 changes: 16 additions & 0 deletions lib/bio/twobit/references/ce11.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require_relative "../reference_genome"

module Bio
class TwoBit
class Ce11 < ReferenceGenome
def initialize(**kwargs)
@metadata = Metadata.new
@metadata.id = "ce11"
@metadata.name = "ce11"
@metadata.url = "https://hgdownload.soe.ucsc.edu/downloads.html"
@data_url = "https://hgdownload.soe.ucsc.edu/goldenPath/ce11/bigZips/ce11.2bit"
super(**kwargs)
end
end
end
end
16 changes: 16 additions & 0 deletions lib/bio/twobit/references/cersim1.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require_relative "../reference_genome"

module Bio
class TwoBit
class CerSim1 < ReferenceGenome
def initialize(**kwargs)
@metadata = Metadata.new
@metadata.id = "cerSim1"
@metadata.name = "cerSim1"
@metadata.url = "https://hgdownload.soe.ucsc.edu/downloads.html"
@data_url = "https://hgdownload.soe.ucsc.edu/goldenPath/cerSim1/bigZips/cerSim1.2bit"
super(**kwargs)
end
end
end
end
Loading

0 comments on commit 246e08c

Please sign in to comment.