Sha256: add276fe3efb701b39a21d52141d3cc1966626be114abf5860d60f86a917c8e5

Contents?: true

Size: 1.03 KB

Versions: 140

Compression:

Stored size: 1.03 KB

Contents

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

class TestPersistTSVKC < Test::Unit::TestCase
  if Persist.respond_to? :open_kyotocabinet
    def test_organism_kch
      require 'rbbt/sources/organism'
      TmpFile.with_file do |tmp_file|
        tsv = Organism.identifiers("Hsa").tsv :key_field => "Associated Gene Name", :fields => ["Ensembl Gene ID"], :type => :single, :persist => true, :persist_engine => "kch", :persist_dir => tmp_file
        assert_equal "ENSG00000141510", tsv["TP53"]
      end
    end


    def test_organism_kct
      require 'rbbt/sources/organism'
      TmpFile.with_file do |tmp_file|
        tsv = Organism.identifiers("Hsa").tsv :key_field => "Associated Gene Name", :fields => ["Ensembl Gene ID"], :type => :single, :persist => true, :persist_engine => "kct", :persist_dir => tmp_file
        assert_equal "ENSG00000141510", tsv["TP53"]
      end
    end
  end
end

Version data entries

140 entries across 140 versions & 1 rubygems

Version Path
rbbt-util-5.43.0 test/rbbt/persist/tsv/test_kyotocabinet.rb
rbbt-util-5.42.0 test/rbbt/persist/tsv/test_kyotocabinet.rb
rbbt-util-5.41.1 test/rbbt/persist/tsv/test_kyotocabinet.rb
rbbt-util-5.41.0 test/rbbt/persist/tsv/test_kyotocabinet.rb
rbbt-util-5.40.5 test/rbbt/persist/tsv/test_kyotocabinet.rb
rbbt-util-5.40.4 test/rbbt/persist/tsv/test_kyotocabinet.rb
rbbt-util-5.40.3 test/rbbt/persist/tsv/test_kyotocabinet.rb
rbbt-util-5.40.0 test/rbbt/persist/tsv/test_kyotocabinet.rb
rbbt-util-5.39.0 test/rbbt/persist/tsv/test_kyotocabinet.rb
rbbt-util-5.38.1 test/rbbt/persist/tsv/test_kyotocabinet.rb
rbbt-util-5.38.0 test/rbbt/persist/tsv/test_kyotocabinet.rb
rbbt-util-5.37.16 test/rbbt/persist/tsv/test_kyotocabinet.rb
rbbt-util-5.37.15 test/rbbt/persist/tsv/test_kyotocabinet.rb
rbbt-util-5.37.14 test/rbbt/persist/tsv/test_kyotocabinet.rb
rbbt-util-5.37.13 test/rbbt/persist/tsv/test_kyotocabinet.rb
rbbt-util-5.37.12 test/rbbt/persist/tsv/test_kyotocabinet.rb
rbbt-util-5.37.11 test/rbbt/persist/tsv/test_kyotocabinet.rb
rbbt-util-5.37.10 test/rbbt/persist/tsv/test_kyotocabinet.rb
rbbt-util-5.37.9 test/rbbt/persist/tsv/test_kyotocabinet.rb
rbbt-util-5.37.8 test/rbbt/persist/tsv/test_kyotocabinet.rb