Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(15)  |  Call(11)  |  Derive(0)  |  Import(4)

src/j/c/jcvi-HEAD/apps/emboss.py   jcvi(Download)
    Take protein pairs and needle them.
    """
    from Bio.Emboss.Applications import NeedleCommandline
 
    from jcvi.formats.fasta import Fasta, SeqIO
        fb.close()
        needlefile = pairsfile + "_ab.needle"
        needle_cline = NeedleCommandline(asequence=fa.name,
                            bsequence=fb.name,
                            gapopen=10, gapextend=0.5,
                            outfile=needlefile)
        stdout, stderr = needle_cline()

src/p/y/pymol-psico-HEAD/psico/seqalign.py   pymol-psico(Download)
    '''
    import subprocess
    from Bio.Emboss.Applications import NeedleCommandline
    from Bio import AlignIO
    cline = NeedleCommandline(auto=True, sprotein=True, stdout=True, gapopen=10, gapextend=1)

src/b/i/biopython-1.63/Tests/test_Emboss.py   biopython(Download)
from Bio._py3k import StringIO
 
from Bio.Emboss.Applications import WaterCommandline, NeedleCommandline
from Bio.Emboss.Applications import SeqretCommandline, SeqmatchallCommandline
from Bio import SeqIO
    def test_needle_file(self):
        """needle with the asis trick, output to a file."""
        #Setup,
        cline = NeedleCommandline(cmd=exes["needle"])
        cline.set_parameter("-asequence", "asis:ACCCGGGCGCGGT")
        self.assertEqual(str(eval(repr(cline))), str(cline))
        #Run the tool,
        stdout, stderr = cline()
        #Check it worked,
        self.assertTrue(stderr.strip().startswith("Needleman-Wunsch global alignment"), stderr)
    def test_needle_piped(self):
        """needle with asis trick, output piped to stdout."""
        cline = NeedleCommandline(cmd=exes["needle"],
                                 asequence="asis:ACCCGGGCGCGGT",
                                 bsequence="asis:ACCCGAGCGCGGT",
    def test_needle_needs_output(self):
        """needle without output file or stdout/filter should give error."""
        cline = NeedleCommandline(cmd=exes["needle"],
                                 asequence="asis:ACCCGGGCGCGGT",
                                 bsequence="asis:ACCCGAGCGCGGT",

src/b/i/biopython-HEAD/Tests/test_Emboss.py   biopython(Download)
from Bio._py3k import StringIO
 
from Bio.Emboss.Applications import WaterCommandline, NeedleCommandline
from Bio.Emboss.Applications import SeqretCommandline, SeqmatchallCommandline
from Bio import SeqIO
    def test_needle_file(self):
        """needle with the asis trick, output to a file."""
        #Setup,
        cline = NeedleCommandline(cmd=exes["needle"])
        cline.set_parameter("-asequence", "asis:ACCCGGGCGCGGT")
        self.assertEqual(str(eval(repr(cline))), str(cline))
        #Run the tool,
        stdout, stderr = cline()
        #Check it worked,
        self.assertTrue(stderr.strip().startswith("Needleman-Wunsch global alignment"), stderr)
    def test_needle_piped(self):
        """needle with asis trick, output piped to stdout."""
        cline = NeedleCommandline(cmd=exes["needle"],
                                 asequence="asis:ACCCGGGCGCGGT",
                                 bsequence="asis:ACCCGAGCGCGGT",
    def test_needle_needs_output(self):
        """needle without output file or stdout/filter should give error."""
        cline = NeedleCommandline(cmd=exes["needle"],
                                 asequence="asis:ACCCGGGCGCGGT",
                                 bsequence="asis:ACCCGAGCGCGGT",