Did I find the right examples for you? yes no

All Samples(12)  |  Call(10)  |  Derive(0)  |  Import(2)

src/c/o/cogent-1.5.3/tests/test_app/test_muscle_v38.py   cogent(Download)
from cogent.util.unit_test import TestCase, main
from cogent.util.misc import flatten
from cogent.app.muscle_v38 import Muscle, muscle_seqs, aln_tree_seqs, \
        align_unaligned_seqs, build_tree_from_alignment, \
        align_and_build_tree, add_seqs_to_alignment, align_two_alignments
    def test_base_command(self):
        """Muscle BaseCommand should return the correct BaseCommand"""
        c = Muscle()
        self.assertEqual(c.BaseCommand,\
            ''.join(['cd "',getcwd(),'/"; ','muscle']))
    def test_maxmb(self):
        """maxmb option should not break Muscle"""
        app = Muscle()
        app.Parameters['-maxmb'].on('250')
        outfile = tempfile.NamedTemporaryFile()
            ">Seq2\nAAAGGGGGTTTCCACT\n")
        infile.flush()
        result = app(infile.name)
 
        observed = result['MuscleOut'].read()
    def test_changing_working_dir(self):
        """Muscle BaseCommand should change according to WorkingDir"""
        c = Muscle(WorkingDir='/tmp/muscle_test')
        self.assertEqual(c.BaseCommand,\
            ''.join(['cd "','/tmp/muscle_test','/"; ','muscle']))

src/p/y/pycogent-HEAD/tests/test_app/test_muscle_v38.py   pycogent(Download)
from cogent.util.unit_test import TestCase, main
from cogent.util.misc import flatten
from cogent.app.muscle_v38 import Muscle, muscle_seqs, aln_tree_seqs, \
        align_unaligned_seqs, build_tree_from_alignment, \
        align_and_build_tree, add_seqs_to_alignment, align_two_alignments
    def test_base_command(self):
        """Muscle BaseCommand should return the correct BaseCommand"""
        c = Muscle()
        self.assertEqual(c.BaseCommand,\
            ''.join(['cd "',getcwd(),'/"; ','muscle']))
    def test_maxmb(self):
        """maxmb option should not break Muscle"""
        app = Muscle()
        app.Parameters['-maxmb'].on('250')
        outfile = tempfile.NamedTemporaryFile()
            ">Seq2\nAAAGGGGGTTTCCACT\n")
        infile.flush()
        result = app(infile.name)
 
        observed = result['MuscleOut'].read()
    def test_changing_working_dir(self):
        """Muscle BaseCommand should change according to WorkingDir"""
        c = Muscle(WorkingDir='/tmp/muscle_test')
        self.assertEqual(c.BaseCommand,\
            ''.join(['cd "','/tmp/muscle_test','/"; ','muscle']))