Sha256: 57fe9a8a078ea67f8b6b7cbb16b65d26bcbaf356ea80f0678585523ccec71197

Contents?: true

Size: 652 Bytes

Versions: 2

Compression:

Stored size: 652 Bytes

Contents

require 'rbbt-util'

module Barcode
  extend Resource
  self.subdir = "share/databases/Barcode"

  Barcode.claim Barcode.transcriptome, :proc do
    tsv = TSV.open(Open.open("http://rafalab.jhsph.edu/barcode/abc.ntc.GPL570.csv"), 
                   :fix => Proc.new{|l| l.gsub('"', '').gsub(',', "\t")}, :header_hash => "",
                  :type => :list, :cast => :to_f)
    io = Open.open("http://rafalab.jhsph.edu/barcode/abc.ntc.GPL570.csv")
    fields = io.gets.chomp.gsub('"','').split(',')
    io.close
    fields.shift
    tsv.fields = fields
    tsv.key_field = "AFFY HG U133-PLUS-2"
    tsv.to_s
  end

end


Barcode.transcriptome.produce

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rbbt-sources-1.2.0 lib/rbbt/sources/barcode.rb
rbbt-sources-1.1.0 lib/rbbt/sources/barcode.rb