Ejemplo n.º 1
0
 def test_gmapCreateDB_case1(self):
     """Test _gmapCreateDB(refFile, isWithinRepository, tempRootDir).
     Condition: the reference is not within a reference repository.
     """
     # Case 1: the reference is not within a reference repository
     files = PBAlignFiles()
     parser = argparse.ArgumentParser()
     argumentList = [self.queryFofn, self.refFa, self.outSam,
                     '--algorithm', 'gmap']
     parser, options, _info = parseOptions(argumentList=argumentList,
                                           parser=parser)
     service = GMAPService(options, files)
     dbRoot, dbName = service._gmapCreateDB(self.refFa, False, self.outDir)
     self.assertTrue(path.exists(dbRoot))
     self.assertTrue(path.exists(path.join(dbRoot, dbName)))
Ejemplo n.º 2
0
 def test_gmapCreateDB_case1(self):
     """Test _gmapCreateDB(refFile, isWithinRepository, tempRootDir).
     Condition: the reference is not within a reference repository.
     """
     # Case 1: the reference is not within a reference repository
     files = PBAlignFiles()
     parser = argparse.ArgumentParser()
     argumentList = [
         self.queryFofn, self.refFa, self.outSam, '--algorithm', 'gmap'
     ]
     parser, options, _info = parseOptions(argumentList=argumentList,
                                           parser=parser)
     service = GMAPService(options, files)
     dbRoot, dbName = service._gmapCreateDB(self.refFa, False, self.outDir)
     self.assertTrue(path.exists(dbRoot))
     self.assertTrue(path.exists(path.join(dbRoot, dbName)))
Ejemplo n.º 3
0
 def test_gmapCreateDB_case2(self):
     """Test _gmapCreateDB(refFile, isWithinRepository, tempRootDir).
     Condition: the reference is within a reference repository.
     """
     # Case 2: the reference is within a reference repository
     files = PBAlignFiles()
     parser = argparse.ArgumentParser()
     argumentList = [self.queryFofn, self.repoPath, self.outSam,
                     '--algorithm', 'gmap']
     parser, options, _info = parseOptions(argumentList=argumentList,
                                           parser=parser)
     service = GMAPService(options, files)
     dbRoot, dbName = service._gmapCreateDB(files.targetFileName, True,
                                            self.outDir)
     self.assertEqual(path.abspath(dbRoot), path.abspath(self.repoPath))
     self.assertEqual(dbName, "gmap_db")
Ejemplo n.º 4
0
 def test_gmapCreateDB_case2(self):
     """Test _gmapCreateDB(refFile, isWithinRepository, tempRootDir).
     Condition: the reference is within a reference repository.
     """
     # Case 2: the reference is within a reference repository
     files = PBAlignFiles()
     parser = argparse.ArgumentParser()
     argumentList = [
         self.queryFofn, self.repoPath, self.outSam, '--algorithm', 'gmap'
     ]
     parser, options, _info = parseOptions(argumentList=argumentList,
                                           parser=parser)
     service = GMAPService(options, files)
     dbRoot, dbName = service._gmapCreateDB(files.targetFileName, True,
                                            self.outDir)
     self.assertEqual(path.abspath(dbRoot), path.abspath(self.repoPath))
     self.assertEqual(dbName, "gmap_db")