test/rbbt/sources/test_organism.rb in rbbt-sources-3.0.34 vs test/rbbt/sources/test_organism.rb in rbbt-sources-3.0.35
- old
+ new
@@ -3,41 +3,41 @@
require 'test/unit'
require 'rbbt/sources/ensembl_ftp'
class TestOrganism < Test::Unit::TestCase
- def _test_known_ids
+ def test_known_ids
assert Organism.known_ids("Hsa").include?("Associated Gene Name")
end
- def _test_location
+ def test_location
assert_equal "share/organisms/Sce/identifiers", Organism.identifiers('Sce')
end
- def _test_identifiers
+ def test_identifiers
assert Organism.identifiers('Hsa').tsv(:key_field => "Entrez Gene ID", :persist => true)['1020']["Associated Gene Name"].include?('CDK5')
assert Organism.identifiers('Sce').tsv(:persist => true)['S000006120']["Ensembl Gene ID"].include?('YPL199C')
assert Organism.identifiers("Sce").tsv(:persist => true)['S000006120']["Ensembl Gene ID"].include?('YPL199C')
end
- def _test_lexicon
+ def test_lexicon
assert TSV.open(Organism.lexicon('Sce'))['S000006120'].flatten.include?('YPL199C')
end
- def _test_guess_id
+ def test_guess_id
ensembl = %w(YOL044W YDR289C YAL034C YGR246C ARS519 tH(GUG)E2 YDR218C YLR002C YGL224C)
gene_name = %w(SNR64 MIP1 MRPS18 TFB2 JEN1 IVY1 TRS33 GAS3)
assert_equal "Associated Gene Name", Organism.guess_id("Sce", gene_name).first
assert_equal "Ensembl Gene ID", Organism.guess_id("Sce", ensembl).first
end
- def _test_organisms
+ def test_organisms
assert Organism.organisms.include? "Hsa"
assert_equal "Hsa", Organism.organism("Homo sapiens")
end
- def _test_attach_translations
+ def test_attach_translations
tsv = TSV.setup({"1020" => []}, :type => :list)
tsv.key_field = "Entrez Gene ID"
tsv.fields = []
tsv.namespace = "Hsa"
@@ -45,11 +45,11 @@
Organism.attach_translations "Hsa", tsv, "Ensembl Gene ID"
assert_equal "CDK5", tsv["1020"]["Associated Gene Name"]
end
- def _test_entrez_taxids
+ def test_entrez_taxids
assert_equal "Hsa", Organism.entrez_taxid_organism('9606')
end
def test_lift_over
mutation_19 = "19:21131664:T"
@@ -59,25 +59,25 @@
assert_equal mutation_18, Organism.liftOver([mutation_19], source_build, target_build).first
assert_equal mutation_19, Organism.liftOver([mutation_18], target_build, source_build).first
end
- def _test_orhtolog
+ def test_orhtolog
require 'rbbt/entity/gene'
assert_equal ["ENSG00000133703"], Gene.setup("Kras", "Associated Gene Name", "Mmu/jun2011").ensembl.ortholog(Organism.default_code("Hsa"))
end
- #def _test_genes_at_chromosome
+ #def test_genes_at_chromosome
# pos = [12, 117799500]
# assert_equal "ENSG00000089250", Organism::Hsa.genes_at_chromosome_positions(pos.first, pos.last)
#end
- #def _test_genes_at_chromosome_array
+ #def test_genes_at_chromosome_array
# pos = [12, [117799500, 106903900]]
# assert_equal ["ENSG00000089250", "ENSG00000013503"], Organism::Hsa.genes_at_chromosome_positions(pos.first, pos.last)
#end
- #def _test_genes_at_genomic_positions
+ #def test_genes_at_genomic_positions
# pos = [[12, 117799500], [12, 106903900], [1, 115259500]]
# assert_equal ["ENSG00000089250", "ENSG00000013503", "ENSG00000213281"], Organism::Hsa.genes_at_genomic_positions(pos)
#end
end