コード例 #1
0
ファイル: test_reveal.py プロジェクト: jasperlinthorst/reveal
 def test19_convert_cmd(self):
     sys.argv=['reveal','convert','1a_1b.gfa','123a_123b.gfa']
     reveal.main()
     self.assertTrue(os.path.exists("1a_1b.gml"))
     self.assertTrue(os.path.exists("123a_123b.gml"))
     os.remove("1a_1b.gml")
     os.remove("123a_123b.gml")
コード例 #2
0
ファイル: test_reveal.py プロジェクト: jasperlinthorst/reveal
 def test20_merge_cmd(self):
     sys.argv = [
         'reveal', 'merge', '1a_1b.gfa.gz', '1c_1d.gfa.gz', '-o', 'merged'
     ]
     reveal.main()
     self.assertTrue(os.path.exists("merged.gfa.gz"))
     os.remove("merged.gfa.gz")
コード例 #3
0
ファイル: test_reveal.py プロジェクト: CooKySch/reveal
 def test16_finish_cmd(self):
     sys.argv=['reveal','finish','tests/1a.fa','tests/1b.fa']
     reveal.main()
     self.assertTrue(os.path.exists("1a_1b.fasta"))
     self.assertTrue(os.path.exists("1a_1b.unplaced.fasta"))
     os.remove("1a_1b.fasta")
     os.remove("1a_1b.unplaced.fasta")
コード例 #4
0
ファイル: test_reveal.py プロジェクト: CooKySch/reveal
 def test19_convert_cmd(self):
     sys.argv=['reveal','convert','1a_1b.gfa','123a_123b.gfa']
     reveal.main()
     self.assertTrue(os.path.exists("1a_1b.gml"))
     self.assertTrue(os.path.exists("123a_123b.gml"))
     os.remove("1a_1b.gml")
     os.remove("123a_123b.gml")
コード例 #5
0
ファイル: test_reveal.py プロジェクト: jasperlinthorst/reveal
 def test16_finish_cmd(self):
     sys.argv=['reveal','finish','tests/1a.fa','tests/1b.fa']
     reveal.main()
     self.assertTrue(os.path.exists("1a_1b.fasta"))
     self.assertTrue(os.path.exists("1a_1b.unplaced.fasta"))
     os.remove("1a_1b.fasta")
     os.remove("1a_1b.unplaced.fasta")
コード例 #6
0
ファイル: test_reveal.py プロジェクト: jasperlinthorst/reveal
 def test09_variants_cmd(self):
     sys.stdout=StringIO()
     sys.argv=['reveal','variants','1a_1b_1c.gfa']
     reveal.main()
     v=sys.stdout.getvalue()
     lines=v.split('\n')
     self.assertTrue(len(lines)>0)
     self.assertTrue(lines[0].startswith("#"))
コード例 #7
0
ファイル: test_reveal.py プロジェクト: CooKySch/reveal
 def test09_variants_cmd(self):
     sys.stdout=StringIO()
     sys.argv=['reveal','variants','1a_1b_1c.gfa']
     reveal.main()
     v=sys.stdout.getvalue()
     lines=v.split('\n')
     self.assertTrue(len(lines)>0)
     self.assertTrue(lines[0].startswith("#"))
コード例 #8
0
ファイル: test_reveal.py プロジェクト: CooKySch/reveal
 def test10_stats_cmd(self):
     sys.stdout=StringIO()
     sys.argv=['reveal','stats','1a_1b_1c.gfa']
     reveal.main()
     v=sys.stdout.getvalue()
     lines=v.split('\n')
     self.assertTrue(len(lines)>0)
     self.assertTrue(lines[0].find(":")!=-1)
コード例 #9
0
ファイル: test_reveal.py プロジェクト: jasperlinthorst/reveal
 def test10_stats_cmd(self):
     sys.stdout=StringIO()
     sys.argv=['reveal','stats','1a_1b_1c.gfa']
     reveal.main()
     v=sys.stdout.getvalue()
     lines=v.split('\n')
     self.assertTrue(len(lines)>0)
     self.assertTrue(lines[0].find(":")!=-1)
コード例 #10
0
ファイル: test_reveal.py プロジェクト: CooKySch/reveal
 def test12_split_cmd(self):
     sys.argv=['reveal','split','123a_123b.gfa']
     reveal.main()
     self.assertTrue(os.path.exists("ACJE01000020_BB_An18_A_niger_CBS_513_88.gfa"))
     self.assertTrue(os.path.exists("ACJE01000011_BB_An19_A_niger_CBS_513_88.gfa"))
     self.assertTrue(os.path.exists("ACJE01000004_BB_An01_A_niger_CBS_513_88.gfa"))
     os.remove("ACJE01000020_BB_An18_A_niger_CBS_513_88.gfa")
     os.remove("ACJE01000011_BB_An19_A_niger_CBS_513_88.gfa")
     os.remove("ACJE01000004_BB_An01_A_niger_CBS_513_88.gfa")
コード例 #11
0
ファイル: test_reveal.py プロジェクト: CooKySch/reveal
 def test15_extract_cmd(self):
     sys.stdout=StringIO()
     sys.argv=['reveal','extract','1a_1b.gfa','ACJE01000011_BB']
     reveal.main()
     for name,seq in utils.fasta_reader("tests/1a.fa"):
         pass
     extracted=sys.stdout.getvalue()
     extracted=extracted[extracted.find('\n')+1:].replace("\n","")
     self.assertTrue(seq==extracted)
コード例 #12
0
ファイル: test_reveal.py プロジェクト: jasperlinthorst/reveal
 def test08_bubbles_cmd(self):
     sys.stdout=StringIO()
     sys.argv=['reveal','bubbles','1a_1b_1c.gfa']
     reveal.main()
     v=sys.stdout.getvalue()
     lines=v.split('\n')
     self.assertTrue(len(lines)>0)
     self.assertTrue(lines[0].startswith("#"))
     TestReveal.pair=lines[-3].split("\t")[:2]
コード例 #13
0
ファイル: test_reveal.py プロジェクト: CooKySch/reveal
 def test08_bubbles_cmd(self):
     sys.stdout=StringIO()
     sys.argv=['reveal','bubbles','1a_1b_1c.gfa']
     reveal.main()
     v=sys.stdout.getvalue()
     lines=v.split('\n')
     self.assertTrue(len(lines)>0)
     self.assertTrue(lines[0].startswith("#"))
     TestReveal.pair=lines[-3].split("\t")[:2]
コード例 #14
0
ファイル: test_reveal.py プロジェクト: jasperlinthorst/reveal
 def test12_split_cmd(self):
     sys.argv=['reveal','split','123a_123b.gfa']
     reveal.main()
     self.assertTrue(os.path.exists('0.gfa'))
     self.assertTrue(os.path.exists('1.gfa'))
     self.assertTrue(os.path.exists('2.gfa'))
     os.remove("0.gfa")
     os.remove("1.gfa")
     os.remove("2.gfa")
コード例 #15
0
ファイル: test_reveal.py プロジェクト: jasperlinthorst/reveal
 def test15_extract_cmd(self):
     sys.stdout=StringIO()
     sys.argv=['reveal','extract','1a_1b.gfa','ACJE01000011_BB']
     reveal.main()
     for name,seq in utils.fasta_reader("tests/1a.fa"):
         pass
     extracted=sys.stdout.getvalue()
     extracted=extracted[extracted.find('\n')+1:].replace("\n","")
     self.assertTrue(seq==extracted)
コード例 #16
0
ファイル: test_reveal.py プロジェクト: CooKySch/reveal
 def test14_complexbubble_cmd(self):
     sys.stdout=StringIO()
     sys.argv=['reveal','bubbles','1a_1b_1c.realigned.gfa']
     reveal.main()
     found=True #not the case anymore, test always succeeds
     v=sys.stdout.getvalue()
     self.assertTrue(v[0]=='#')
     for line in v.strip().split('\n'):
         if line.split("\t")[3]=='complex':
             found=True
             break
     self.assertTrue(found)
     os.remove('1a_1b_1c.realigned.gfa')
コード例 #17
0
ファイル: test_reveal.py プロジェクト: jasperlinthorst/reveal
 def test14_complexbubble_cmd(self):
     sys.stdout=StringIO()
     sys.argv=['reveal','bubbles','1a_1b_1c.realigned.gfa']
     reveal.main()
     found=True #not the case anymore, test always succeeds
     v=sys.stdout.getvalue()
     self.assertTrue(v[0]=='#')
     for line in v.strip().split('\n'):
         if line.split("\t")[3]=='complex':
             found=True
             break
     self.assertTrue(found)
     os.remove('1a_1b_1c.realigned.gfa')
コード例 #18
0
ファイル: test_reveal.py プロジェクト: jasperlinthorst/reveal
 def test13_refine_cmd(self):
     print self.pair
     sys.argv=['reveal','refine','1a_1b_1c.gfa','--all','-n2']
     reveal.main()
     self.assertTrue(os.path.exists('1a_1b_1c.realigned.gfa'))
コード例 #19
0
ファイル: test_reveal.py プロジェクト: jasperlinthorst/reveal
 def test04_fastamulti_align_cmd(self):
     sys.argv=['reveal','rem','tests/1a.fa','tests/1b.fa','tests/1c.fa']
     reveal.main()
     self.assertTrue(os.path.exists("1a_1b_1c.gfa"))
コード例 #20
0
ファイル: test_reveal.py プロジェクト: CooKySch/reveal
 def test06_fasta2graph_align_cmd(self):
     sys.argv=['reveal','rem','tests/1c.fa','1a_1b.gfa']
     reveal.main()
     self.assertTrue(os.path.exists("1c_1a_1b.gfa"))
コード例 #21
0
ファイル: test_reveal.py プロジェクト: CooKySch/reveal
 def test04_fastamulti_align_cmd(self):
     sys.argv=['reveal','rem','tests/1a.fa','tests/1b.fa','tests/1c.fa']
     reveal.main()
     self.assertTrue(os.path.exists("1a_1b_1c.gfa"))
コード例 #22
0
ファイル: test_reveal.py プロジェクト: jasperlinthorst/reveal
 def test11_comp_cmd(self):
     sys.argv=['reveal','comp','1a_1b_1c.gfa']
     reveal.main()
     self.assertTrue(os.path.exists('1a_1b_1c.rc.gfa'))
     os.remove("1a_1b_1c.rc.gfa")
コード例 #23
0
ファイル: test_reveal.py プロジェクト: jasperlinthorst/reveal
 def test07_multifastapair_align_cmd(self):
     sys.argv=['reveal','rem','tests/123a.fa','tests/123b.fa','-m1000']
     reveal.main()
     self.assertTrue(os.path.exists("123a_123b.gfa"))
コード例 #24
0
ファイル: test_reveal.py プロジェクト: jasperlinthorst/reveal
 def test06_fasta2graph_align_cmd(self):
     sys.argv=['reveal','rem','tests/1c.fa','1a_1b.gfa']
     reveal.main()
     self.assertTrue(os.path.exists("1c_1a_1b.gfa"))
コード例 #25
0
ファイル: test_reveal.py プロジェクト: jasperlinthorst/reveal
 def test05_graph2graph_align_cmd(self):
     sys.argv=['reveal','rem','1a_1b.gfa','1c_1d.gfa']
     reveal.main()
     self.assertTrue(os.path.exists("1a_1b_1c_1d.gfa"))
コード例 #26
0
ファイル: test_reveal.py プロジェクト: CooKySch/reveal
 def test03_64_fastapair_align_cmd(self):
     sys.argv=['reveal','rem','--64','tests/1c.fa','tests/1d.fa']
     reveal.main()
     self.assertTrue(os.path.exists("1c_1d.gfa"))
コード例 #27
0
ファイル: test_reveal.py プロジェクト: jasperlinthorst/reveal
 def test02_fastapair_align_cmd(self):
     sys.argv = ['reveal', 'rem', 'tests/1a.fa', 'tests/1b.fa']
     reveal.main()
     self.assertTrue(os.path.exists("1a_1b.gfa.gz"))
コード例 #28
0
ファイル: test_reveal.py プロジェクト: CooKySch/reveal
 def test05_graph2graph_align_cmd(self):
     sys.argv=['reveal','rem','1a_1b.gfa','1c_1d.gfa']
     reveal.main()
     self.assertTrue(os.path.exists("1a_1b_1c_1d.gfa"))
コード例 #29
0
ファイル: test_reveal.py プロジェクト: jasperlinthorst/reveal
 def test20_merge_cmd(self):
     sys.argv=['reveal','merge','1a_1b.gfa','1c_1d.gfa','-o','merged']
     reveal.main()
     self.assertTrue(os.path.exists("merged.gfa"))
     os.remove("merged.gfa")
コード例 #30
0
ファイル: test_reveal.py プロジェクト: CooKySch/reveal
 def test07_multifastapair_align_cmd(self):
     sys.argv=['reveal','rem','tests/123a.fa','tests/123b.fa','-m1000']
     reveal.main()
     self.assertTrue(os.path.exists("123a_123b.gfa"))
コード例 #31
0
ファイル: test_reveal.py プロジェクト: CooKySch/reveal
 def test13_refine_cmd(self):
     print self.pair
     sys.argv=['reveal','refine','1a_1b_1c.gfa','--all','-n2']
     reveal.main()
     self.assertTrue(os.path.exists('1a_1b_1c.realigned.gfa'))
コード例 #32
0
ファイル: test_reveal.py プロジェクト: jasperlinthorst/reveal
 def test18_multichain_cmd(self):
     sys.argv=['reveal','chain','tests/1a.fa','tests/1b.fa','tests/1c.fa','-o','1a_1b_1c.chain']
     reveal.main()
     self.assertTrue(os.path.exists("1a_1b_1c.chain.gfa"))
     os.remove("1a_1b_1c.chain.gfa")
コード例 #33
0
ファイル: test_reveal.py プロジェクト: jasperlinthorst/reveal
 def test03_64_fastapair_align_cmd(self):
     sys.argv=['reveal','rem','--64','tests/1c.fa','tests/1d.fa']
     reveal.main()
     self.assertTrue(os.path.exists("1c_1d.gfa"))