Back to index

python-biopython  1.60
Public Member Functions
test_raxml_tool.AppTests Class Reference

List of all members.

Public Member Functions

def test_raxml

Detailed Description

Tests for application wrappers.

Definition at line 33 of file test_raxml_tool.py.


Member Function Documentation

Run RAxML using the wrapper.

Definition at line 36 of file test_raxml_tool.py.

00036 
00037     def test_raxml(self):
00038         """Run RAxML using the wrapper."""
00039         cmd = RaxmlCommandline(raxml_exe,
00040                                sequences=EX_PHYLIP, model="PROTCATWAG",
00041                                name="test")
00042         # The parsimony seed should be set automatically
00043         self.assert_('-p' in str(cmd))
00044         # Smoke test
00045         try:
00046             out, err = cmd()
00047             self.assert_(len(out) > 0)
00048             self.assert_(len(err) == 0)
00049             # Check the output tree
00050             tree = Phylo.read('RAxML_result.test', 'newick')
00051             self.assertEqual(tree.count_terminals(), 4)
00052         finally:
00053             # Remove RAxML-generated files, or RAxML will complain bitterly
00054             # during the next run
00055             for fname in ['RAxML_info.test',
00056                           'RAxML_log.test',
00057                           'RAxML_parsimonyTree.test',
00058                           'RAxML_result.test',
00059                           # Present in 7.2.X+  but not 7.0.4:
00060                           'RAxML_bestTree.test',
00061                          ]:
00062                 if os.path.isfile(fname):
00063                     os.remove(fname)
00064 
00065 
00066 # ---------------------------------------------------------


The documentation for this class was generated from the following file: