コード例 #1
0
 def test_non_supported_organism(self):
     fake_reference_folder = FakeReferenceFolder()
     test_tools.mock_file_existence(
         existing_files=fake_reference_folder.resources
     )
     with self.assertRaises(NeofoxConfigurationException):
         ReferenceFolder(organism="rat")
コード例 #2
0
 def test_one_resource_do_not_exist(self):
     fake_reference_folder = FakeReferenceFolder()
     test_tools.mock_file_existence(
         existing_files=fake_reference_folder.resources[
             1 : len(fake_reference_folder.resources)
         ],
         non_existing_files=[fake_reference_folder.resources[0]],
     )
     with self.assertRaises(NeofoxConfigurationException):
         ReferenceFolder()
コード例 #3
0
 def setUp(self):
     self.variables = {
         neofox.NEOFOX_BLASTP_ENV: "/path/to/blastp",
         neofox.NEOFOX_NETMHC2PAN_ENV: "/path/to/netmhc2pan",
         neofox.NEOFOX_NETMHCPAN_ENV: "/path/to/netmhcpan",
         neofox.NEOFOX_RSCRIPT_ENV: "/path/to/rscript",
         neofox.NEOFOX_MIXMHCPRED_ENV: "/path/to/mixmhcpred",
         neofox.NEOFOX_MIXMHC2PRED_ENV: "/path/to/mixmhc2pred",
         neofox.NEOFOX_PRIME_ENV: "/path/to/prime",
     }
     self.non_existing = "/path/to/nothing"
     self.non_executable = "/path/to/something/not/executable"
     test_tools.mock_file_existence(
         existing_files=list(self.variables.values()) + [self.non_executable],
         non_existing_files=[self.non_existing],
     )
     test_tools.mock_file_is_executable(
         executable_files=list(self.variables.values()),
         non_executable_files=[self.non_executable],
     )
コード例 #4
0
 def test_organism_human(self):
     fake_reference_folder = FakeReferenceFolder()
     test_tools.mock_file_existence(
         existing_files=fake_reference_folder.resources
     )
     ReferenceFolder(organism=ORGANISM_HOMO_SAPIENS)
コード例 #5
0
 def test_organism_mouse(self):
     fake_reference_folder = FakeReferenceFolder(organism=ORGANISM_MUS_MUSCULUS)
     test_tools.mock_file_existence(
         existing_files=fake_reference_folder.resources
     )
     ReferenceFolder(organism=ORGANISM_MUS_MUSCULUS)
コード例 #6
0
 def test_all_resources_exist(self):
     fake_reference_folder = FakeReferenceFolder()
     test_tools.mock_file_existence(
         existing_files=fake_reference_folder.resources
     )
     ReferenceFolder()