Did I find the right examples for you? yes no

All Samples(10)  |  Call(6)  |  Derive(0)  |  Import(4)

src/p/y/pycogent-HEAD/tests/benchmark_aligning.py   pycogent(Download)
import time
from cogent import DNA
from cogent.align.align import classic_align_pairwise, make_dna_scoring_dict
 
__author__ = "Peter Maxwell"
    try:
        # return_alignment is False in order to emphasise the quadratic part of the work.
        aln = classic_align_pairwise(seq1, seq2, S, 10, 2, local=False, return_alignment=False, **kw)
    except ArithmeticError:
        return '*'

src/c/o/cogent-1.5.3/tests/benchmark_aligning.py   cogent(Download)
import time
from cogent import DNA
from cogent.align.align import classic_align_pairwise, make_dna_scoring_dict
 
__author__ = "Peter Maxwell"
 
    t0 = time.time()
    aln = classic_align_pairwise(seq1, seq2, S, 10, 2, local=False, **kw)
    t = time.time() - t0
    return (len(seq1)*len(seq2))/t

src/c/o/cogent-1.5.3/tests/test_align/test_align.py   cogent(Download)
#!/usr/bin/env python
 
from cogent import DNA, LoadSeqs
from cogent.align.align import classic_align_pairwise, make_dna_scoring_dict,\
        local_pairwise, global_pairwise
    def _aligned_both_ways(self, seq1, seq2, **kw):
        S = make_dna_scoring_dict(10, -1, -8)
        a1 = classic_align_pairwise(seq1, seq2, S, 10, 2, **kw)
        a2 = classic_align_pairwise(seq2, seq1, S, 10, 2, **kw)
        return [a1, a2]

src/p/y/pycogent-HEAD/tests/test_align/test_align.py   pycogent(Download)
#!/usr/bin/env python
 
from cogent import DNA, LoadSeqs
from cogent.align.align import classic_align_pairwise, make_dna_scoring_dict,\
        local_pairwise, global_pairwise
    def _aligned_both_ways(self, seq1, seq2, **kw):
        S = make_dna_scoring_dict(10, -1, -8)
        a1 = classic_align_pairwise(seq1, seq2, S, 10, 2, **kw)
        a2 = classic_align_pairwise(seq2, seq1, S, 10, 2, **kw)
        return [a1, a2]