Sha256: 8cb58bda785f174360abe0e5d4a7008ef937d881d382102714b0014b91550b27

Contents?: true

Size: 767 Bytes

Versions: 29

Compression:

Stored size: 767 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../../test_helper')
require 'rbbt/persist'
require 'rbbt/annotations'
require 'rbbt/util/tmpfile'
require 'test/unit'

module TestAnnotation
  extend Annotation

  self.annotation :test_annotation
end

class TestPersistTSVCDB < Test::Unit::TestCase

  def test_organism
    require 'rbbt/sources/organism'
    TmpFile.with_file nil do |tmp_file|
      file = CMD.cmd("head -n 1000000", :in => Organism.identifiers("Hsa").open, :pipe => true)
      tsv = Organism.identifiers("Hsa").tsv(:key_field => "Associated Gene Name", :fields => ["Ensembl Gene ID"], :type => :single, :persist => true, :persist_engine => "CDB", :persist_dir => tmp_file)
      assert_equal "ENSG00000141510", tsv["TP53"]
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
rbbt-util-5.8.10 test/rbbt/persist/tsv/test_cdb.rb
rbbt-util-5.8.9 test/rbbt/persist/tsv/test_cdb.rb
rbbt-util-5.8.8 test/rbbt/persist/tsv/test_cdb.rb
rbbt-util-5.8.7 test/rbbt/persist/tsv/test_cdb.rb
rbbt-util-5.8.6 test/rbbt/persist/tsv/test_cdb.rb
rbbt-util-5.8.4 test/rbbt/persist/tsv/test_cdb.rb
rbbt-util-5.8.3 test/rbbt/persist/tsv/test_cdb.rb
rbbt-util-5.8.2 test/rbbt/persist/tsv/test_cdb.rb
rbbt-util-5.8.1 test/rbbt/persist/tsv/test_cdb.rb
rbbt-util-5.8.0 test/rbbt/persist/tsv/test_cdb.rb
rbbt-util-5.7.0 test/rbbt/persist/tsv/test_cdb.rb
rbbt-util-5.6.17 test/rbbt/persist/tsv/test_cdb.rb
rbbt-util-5.6.16 test/rbbt/persist/tsv/test_cdb.rb
rbbt-util-5.6.15 test/rbbt/persist/tsv/test_cdb.rb
rbbt-util-5.6.14 test/rbbt/persist/tsv/test_cdb.rb
rbbt-util-5.6.13 test/rbbt/persist/tsv/test_cdb.rb
rbbt-util-5.6.12 test/rbbt/persist/tsv/test_cdb.rb
rbbt-util-5.6.11 test/rbbt/persist/tsv/test_cdb.rb
rbbt-util-5.6.10 test/rbbt/persist/tsv/test_cdb.rb
rbbt-util-5.6.9 test/rbbt/persist/tsv/test_cdb.rb