Back to index

python-biopython  1.60
Public Member Functions
test_EmbossPhylipNew.BootstrapTests Class Reference

List of all members.

Public Member Functions

def tearDown
def check_bootstrap
def test_bootstrap_phylip_DNA
def test_bootstrap_AlignIO_DNA
def test_bootstrap_phylip_protein
def test_bootstrap_AlignIO_protein

Detailed Description

Tests for pseudosampling alignments with fseqboot

Definition at line 209 of file test_EmbossPhylipNew.py.


Member Function Documentation

def test_EmbossPhylipNew.BootstrapTests.check_bootstrap (   self,
  filename,
  format,
  align_type = "d" 
)
Check we can use fseqboot to pseudosample an alignment

The align_type type argument is passed to the commandline object to
set the output format to use (from [D]na,[p]rotein and [r]na )

Definition at line 215 of file test_EmbossPhylipNew.py.

00215 
00216     def check_bootstrap(self, filename, format, align_type="d"):
00217         """Check we can use fseqboot to pseudosample an alignment
00218         
00219         The align_type type argument is passed to the commandline object to
00220         set the output format to use (from [D]na,[p]rotein and [r]na )
00221         """
00222         self.assertTrue(os.path.isfile(filename), "Missing %s" % filename)
00223         cline = FSeqBootCommandline(exes["fseqboot"],
00224                                     sequence = filename,
00225                                     outfile =  "test_file",
00226                                     seqtype = align_type,
00227                                     reps = 2,
00228                                     auto = True, filter = True)
00229         stdout, stderr = cline()
00230         # the resultant file should have 2 alignments...
00231         bs = list(AlignIO.parse(open("test_file", "r" ), format))
00232         self.assertEqual(len(bs), 2)
00233         # ..and each name in the original alignment...
00234         a_names = [s.name.replace(" ", "_") for s in
00235                    AlignIO.read(open(filename, "r"), format)]
00236         # ...should be in each alignment in the bootstrapped file
00237         for a in bs:
00238             self.assertEqual(a_names, [s.name.replace(" ", "_") for s in a])

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 212 of file test_EmbossPhylipNew.py.

00212 
00213     def tearDown(self):
00214         clean_up()
     

Here is the call graph for this function:

Pseudosample a phylip DNA alignment written with AlignIO

Definition at line 243 of file test_EmbossPhylipNew.py.

00243 
00244     def test_bootstrap_AlignIO_DNA(self):
00245         """Pseudosample a phylip DNA alignment written with AlignIO"""
00246         write_AlignIO_dna()
00247         self.check_bootstrap("Phylip/opuntia.phy", "phylip")

Here is the call graph for this function:

Pseudosample a phylip protein alignment written with AlignIO

Definition at line 252 of file test_EmbossPhylipNew.py.

00252 
00253     def test_bootstrap_AlignIO_protein(self):
00254         """Pseudosample a phylip protein alignment written with AlignIO"""
00255         write_AlignIO_protein()
00256         self.check_bootstrap("Phylip/hedgehog.phy", "phylip", "p")

Here is the call graph for this function:

Pseudosample a phylip DNA alignment

Definition at line 239 of file test_EmbossPhylipNew.py.

00239 
00240     def test_bootstrap_phylip_DNA(self):
00241         """Pseudosample a phylip DNA alignment"""
00242         self.check_bootstrap("Phylip/horses.phy", "phylip")

Here is the call graph for this function:

Pseudosample a phylip protein alignment

Definition at line 248 of file test_EmbossPhylipNew.py.

00248 
00249     def test_bootstrap_phylip_protein(self):
00250         """Pseudosample a phylip protein alignment"""
00251         self.check_bootstrap("Phylip/interlaced.phy", "phylip", "p")

Here is the call graph for this function:


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