Exemplo n.º 1
0
 def test_Probcons_complex_commandline(self):
     """Round-trip through app with complex command line and output file."""
     cmdline = ProbconsCommandline(probcons_exe, pre=1)
     cmdline.set_parameter("input", "Fasta/fa01")
     cmdline.consistency = 4
     cmdline.set_parameter("--iterative-refinement", 222)
     cmdline.set_parameter("a", True)
     cmdline.annot = self.annotation_outfile
     self.assertEqual(str(cmdline), probcons_exe +
                      " -c 4 -ir 222 -pre 1 -annot Fasta/probcons_annot.out"
                      " -a Fasta/fa01")
     stdout, stderr = cmdline()
     self.assertTrue(stderr.startswith("\nPROBCONS"))
     self.assertTrue(stdout.startswith(">AK1H_ECOLI/1-378"))
Exemplo n.º 2
0
 def test_Probcons_complex_commandline(self):
     """Round-trip through app with complex command line and output file."""
     cmdline = ProbconsCommandline(probcons_exe, pre=1)
     cmdline.set_parameter("input", "Fasta/fa01")
     cmdline.consistency = 4
     cmdline.set_parameter("--iterative-refinement", 222)
     cmdline.set_parameter("a", True)
     cmdline.annot = self.annotation_outfile
     self.assertEqual(
         str(cmdline), probcons_exe +
         " -c 4 -ir 222 -pre 1 -annot Fasta/probcons_annot.out"
         " -a Fasta/fa01")
     stdout, stderr = cmdline()
     self.assertTrue(stderr.startswith("\nPROBCONS"))
     self.assertTrue(stdout.startswith(">AK1H_ECOLI/1-378"))
Exemplo n.º 3
0
 def test_Probcons_complex_commandline(self):
     """Round-trip through app with complex command line and output file
     """
     cmdline = ProbconsCommandline(probcons_exe, pre=1)
     cmdline.set_parameter("input", "Fasta/fa01")
     cmdline.consistency = 4
     cmdline.set_parameter("--iterative-refinement", 222)
     cmdline.set_parameter("a", True)
     cmdline.annot = self.annotation_outfile
     self.assertEqual(str(cmdline), probcons_exe + 
             " -c 4 -ir 222 -pre 1 -annot Fasta/probcons_annot.out "
             "-a Fasta/fa01")
     result, stdout, stderr = Application.generic_run(cmdline)
     self.assertEqual(str(cmdline), str(result._cl))
     self.assertEquals(result.return_code, 0)
     self.assert_(stderr.read().startswith("\nPROBCONS"))
     self.assert_(stdout.read().startswith(">AK1H_ECOLI/1-378"))
Exemplo n.º 4
0
 def test_Probcons_complex_commandline(self):
     """Round-trip through app with complex command line and output file
     """
     cmdline = ProbconsCommandline(probcons_exe, pre=1)
     cmdline.set_parameter("input", "Fasta/fa01")
     cmdline.consistency = 4
     cmdline.set_parameter("--iterative-refinement", 222)
     cmdline.set_parameter("a", True)
     cmdline.annot = self.annotation_outfile
     self.assertEqual(
         str(cmdline), probcons_exe +
         " -c 4 -ir 222 -pre 1 -annot Fasta/probcons_annot.out "
         "-a Fasta/fa01")
     result, stdout, stderr = Application.generic_run(cmdline)
     self.assertEqual(str(cmdline), str(result._cl))
     self.assertEquals(result.return_code, 0)
     self.assert_(stderr.read().startswith("\nPROBCONS"))
     self.assert_(stdout.read().startswith(">AK1H_ECOLI/1-378"))
Exemplo n.º 5
0
 def test_Probcons_complex_commandline(self):
     """Round-trip through app with complex command line and output file
     """
     cmdline = ProbconsCommandline(probcons_exe, pre=1)
     cmdline.set_parameter("input", "Fasta/fa01")
     cmdline.consistency = 4
     cmdline.set_parameter("--iterative-refinement", 222)
     cmdline.set_parameter("a", True)
     cmdline.annot = self.annotation_outfile
     self.assertEqual(str(cmdline), probcons_exe +
             " -c 4 -ir 222 -pre 1 -annot Fasta/probcons_annot.out "
             "-a Fasta/fa01")
     child = subprocess.Popen(str(cmdline),
                              stdout=subprocess.PIPE,
                              stderr=subprocess.PIPE,
                              shell=(sys.platform!="win32"))
     return_code = child.wait()
     self.assertEqual(return_code, 0)
     self.assert_(child.stderr.read().startswith("\nPROBCONS"))
     self.assert_(child.stdout.read().startswith(">AK1H_ECOLI/1-378"))
     del child