Sha256: 413c1b0a703c9fbfb808fc8dacce3cab4f4bb6a8b3eca0830e932f6ddb52821a

Contents?: true

Size: 1002 Bytes

Versions: 6

Compression:

Stored size: 1002 Bytes

Contents

require File.join(File.expand_path(File.dirname(__FILE__)), '../..', 'test_helper.rb')
require 'rbbt/mutation/mutation_assessor'

class TestMutationAssessor < Test::Unit::TestCase

  def test_predict_aminoacid_mutation
    mutations = {
      "EGFR_HUMAN" => %w(R521E)
    }

    assert_equal 1, MutationAssessor.predict(mutations).length
  end

  def test_predict_aminoacid_mutation_tsv
    tsv = TSV.setup({"EGFR_HUMAN" => [%w(R521K)]}, :key_field => "UniProt/SwissProt ID", :fields => ["Protein Mutation"], :type => :double)

    assert_equal "neutral", MutationAssessor.add_predictions(tsv).slice("MutationAssessor:Prediction").values.first.flatten.first
    assert_equal 1, MutationAssessor.add_predictions(tsv).slice(["MutationAssessor:Prediction", "Protein Mutation"]).length
  end


  def test_predict_chunked
    mutations = {
      "EGFR_HUMAN" => %w(R521K),
      "P53_HUMAN" => %w(R21K),
    }

    assert(MutationAssessor.chunked_predict(mutations).include? "EGFR_HUMAN R521K")
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rbbt-phgx-3.0.0 test/rbbt/mutation/test_mutation_assessor.rb
rbbt-phgx-2.1.2 test/rbbt/mutation/test_mutation_assessor.rb
rbbt-phgx-2.1.1 test/rbbt/mutation/test_mutation_assessor.rb
rbbt-phgx-2.1.0 test/rbbt/mutation/test_mutation_assessor.rb
rbbt-phgx-2.0.1 test/rbbt/mutation/test_mutation_assessor.rb
rbbt-phgx-2.0.0 test/rbbt/mutation/test_mutation_assessor.rb