Did I find the right examples for you? yes no

All Samples(83)  |  Call(0)  |  Derive(0)  |  Import(83)

src/c/o/cogent-1.5.3/cogent/evolve/pairwise_distance.py   cogent(Download)
from __future__ import division
from numpy import log, zeros, float64, int32, array, sqrt, dot, diag, where
from numpy.linalg import det, norm, inv
 
from cogent import DNA, RNA, LoadTable
    if _same_moltype(RNA, moltype):
        return map(states.index, 'CU')
    elif _same_moltype(DNA, moltype):
        return map(states.index, 'CT')
    else:
def get_purine_indices(moltype):
    """returns purine indices for the moltype"""
    states = list(moltype)
    if not _same_moltype(RNA, moltype) and not _same_moltype(DNA, moltype):
        raise RuntimeError('Non-nucleic acid MolType')
    def __init__(self, *args, **kwargs):
        super(_NucleicSeqPair, self).__init__(*args, **kwargs)
        if not _same_moltype(DNA, self.moltype) and \
            not _same_moltype(RNA, self.moltype):
            raise RuntimeError('Invalid MolType for this metric')

src/p/y/pycogent-HEAD/cogent/evolve/pairwise_distance.py   pycogent(Download)
from __future__ import division
from numpy import log, zeros, float64, int32, array, sqrt, dot, diag, eye
from numpy.linalg import det, norm, inv, LinAlgError
 
from cogent import DNA, RNA, LoadTable
    if _same_moltype(RNA, moltype):
        return map(states.index, 'CU')
    elif _same_moltype(DNA, moltype):
        return map(states.index, 'CT')
    else:
def get_purine_indices(moltype):
    """returns purine indices for the moltype"""
    states = list(moltype)
    if not _same_moltype(RNA, moltype) and not _same_moltype(DNA, moltype):
        raise RuntimeError('Non-nucleic acid MolType')
    def __init__(self, *args, **kwargs):
        super(_NucleicSeqPair, self).__init__(*args, **kwargs)
        if not _same_moltype(DNA, self.moltype) and \
            not _same_moltype(RNA, self.moltype):
            raise RuntimeError('Invalid MolType for this metric')

src/e/e/eebprogramming-HEAD/lec10review/4translation.py   eebprogramming(Download)
#!/usr/bin/env python
# taken from http://pycogent.sourceforge.net/
from cogent import LoadSeqs, DNA, PROTEIN
seqs = {'hum': 'AAGCAGATCCAGGAAAGCAGCGAGAATGGCAGCCTGGCCGCGCGCCAGGAGAGGCAGGCCCAGGTCAACCTCACT',
        'mus': 'AAGCAGATCCAGGAGAGCGGCGAGAGCGGCAGCCTGGCCGCGCGGCAGGAGAGGCAGGCCCAAGTCAACCTCACG',
        'rat': 'CTGAACAAGCAGCCACTTTCAAACAAGAAA'}
unaligned_DNA = LoadSeqs(data=seqs, moltype = DNA, aligned = False)

src/q/i/qiime-1.8.0/qiime/pick_otus.py   qiime(Download)
from cogent.core.sequence import DnaSequence
from cogent.util.misc import remove_files
from cogent import LoadSeqs, DNA, Alignment
from cogent.util.trie import build_prefix_map
from cogent.util.misc import flatten
         Still a bit slower than the prefix_prefilter toggled with prefix_prefilter_length.
        """
        moltype = DNA
        log_lines = []
 

src/q/i/qiime-1.8.0/qiime/util.py   qiime(Download)
 
from cogent.util.dict2d import Dict2D
from cogent import LoadSeqs, Sequence,DNA
from cogent.parse.tree import DndParser
from cogent.core.tree import PhyloNode

src/c/o/cogent-1.5.3/cogent/draw/compatibility.py   cogent(Download)
 
if __name__ == '__main__':
    from cogent import LoadSeqs, DNA
    import sys, optparse, os.path
    parser = optparse.OptionParser("usage: %prog [options] alignment")
        parser.print_help()
        sys.exit(1)        
    alignment = LoadSeqs(args[0], moltype=DNA)
    kw = vars(options)
    kw['title'] = os.path.splitext(os.path.basename(args[0]))[0]

src/p/y/pycogent-HEAD/cogent/draw/compatibility.py   pycogent(Download)
 
if __name__ == '__main__':
    from cogent import LoadSeqs, DNA
    import sys, optparse, os.path
    parser = optparse.OptionParser("usage: %prog [options] alignment")
        parser.print_help()
        sys.exit(1)        
    alignment = LoadSeqs(args[0], moltype=DNA)
    kw = vars(options)
    kw['title'] = os.path.splitext(os.path.basename(args[0]))[0]

src/p/y/pynast-1.2.2/pynast/util.py   pynast(Download)
from glob import glob
 
from cogent import DNA, LoadSeqs, Sequence
from cogent.util.misc import remove_files
from cogent.core.alignment import SequenceCollection, DenseAlignment
        for seq_id,seq in MinimalFastaParser(template_alignment_f):
            template_alignment[seq_id] = seq
            seq = Sequence(seq=seq,moltype=DNA)
            template_fasta_f.write('>%s\n%s\n' % (seq_id,seq.degap()))
    else:
            except AttributeError:
                template_aligned_seq = \
                 Sequence(seq=template_alignment[template_seq_id],moltype=DNA)
 
            # reintroduce the gap spacing from the template alignment

src/c/o/cogent-1.5.3/cogent/parse/cigar.py   cogent(Download)
import re
from cogent.core.location import LostSpan, Span, Map, _LostSpan
from cogent import DNA, LoadSeqs
 
__author__ = "Hua Ying"

src/p/y/pycogent-HEAD/cogent/parse/cigar.py   pycogent(Download)
import re
from cogent.core.location import LostSpan, Span, Map, _LostSpan
from cogent import DNA, LoadSeqs
 
__author__ = "Hua Ying"

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next