Did I find the right examples for you? yes no

All Samples(391)  |  Call(301)  |  Derive(0)  |  Import(90)

src/q/i/qiime-1.8.0/qiime/filter_otus_by_sample.py   qiime(Download)
from string import strip
import re
from cogent import LoadSeqs
 
def filter_otus(otus,prefs):
    #representative set
    try:
        removed_seqs=LoadSeqs(data=removed_seqs,aligned=False)
    except:
        raise ValueError, 'No sequences were removed.  Did you specify the correct Sample ID?'
    #write a fasta containing the filtered representative seqs
    try:
        filtered_seqs=LoadSeqs(data=filtered_seqs,aligned=False)
    except:
        raise ValueError, 'No sequences were remaining in the fasta file.  Did you remove all Sample ID\'s?'

src/q/i/qiime-1.8.0/tests/test_filter_otus_by_sample.py   qiime(Download)
from cogent.util.unit_test import TestCase, main
from os import remove
from cogent import LoadSeqs
import shutil
from qiime.filter_otus_by_sample import (filter_otus,filter_aln_by_otus,\
        exp2.append(('SampleB','CCCCCCC'))
        exp2.append(('SampleC','GGGGGGGGGGGGGG'))
        aln=LoadSeqs(data=self.aln,aligned=False)
 
        obs1,obs2=filter_aln_by_otus(aln,self.prefs)

src/q/i/qiime-1.8.0/scripts/filter_otus_by_sample.py   qiime(Download)
from qiime.filter_otus_by_sample import filter_samples,process_extract_samples
import os
from cogent import LoadSeqs
from qiime.parse import fields_to_dict
 
 
    # load the input alignment
    data['aln'] = LoadSeqs(fasta_file,aligned=False)
 
    #Load the otu file

src/c/h/checkmyclones-0.0.10/src/clonechecker/filetools.py   checkmyclones(Download)
'''
from cogent.parse.record import FileFormatError
from cogent import LoadSeqs, DNA
import os.path
from twobitreader import TwoBitFile
    """   
    try:
        seqs = LoadSeqs(foo, aligned=False, format='fasta', moltype=moltype)
    except FileFormatError:
        fh = open(foo, 'rU')
        s = fh.read().strip()
        name = os.path.basename(foo)
        seqs = LoadSeqs(data=[(name, s)], aligned=False, moltype=moltype)
    """   
    try:
        seqs = LoadSeqs(foo, aligned=False, format='fasta', moltype=moltype)
    except FileFormatError:
        fh = open(foo, 'rU')
        s = fh.read().strip()
        name = os.path.basename(foo)
        seqs = LoadSeqs(data=[(name, s)], aligned=False, moltype=moltype)

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)
        'mus': 'KQIQESGESGSLAARQERQAQVNLT',
        'rat': 'LNKQ------PLS---------NKK'}
aligned_aa = LoadSeqs(data = aligned_aa_seqs, moltype = PROTEIN)
aligned_DNA = aligned_aa.replaceSeqs(unaligned_DNA)
print aligned_DNA

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
            # to avoid the overhead of loading large sequence collections
            # during this step. 
            seqs = LoadSeqs(seq_path,
                            moltype=moltype,
                            aligned=False,

src/q/i/qiime-1.8.0/qiime/align_seqs.py   qiime(Download)
from os import remove
from numpy import median
from cogent import LoadSeqs, DNA
from cogent.core.alignment import DenseAlignment, SequenceCollection, Alignment
from cogent.core.sequence import DnaSequence as Dna
            template_alignment.append((seq_id,seq.replace('.','-').upper()))        
        try:
            template_alignment = LoadSeqs(data=template_alignment,moltype=DNA,\
             aligned=DenseAlignment)
        except KeyError, e:
        else:
            try:
                return LoadSeqs(data=pynast_aligned,aligned=DenseAlignment)
            except ValueError:
                return {}

src/c/o/cogent-1.5.3/cogent/evolve/coevolution.py   cogent(Download)
from cogent.parse.record import FileFormatError
from cogent.evolve.substitution_model import SubstitutionModel
from cogent import LoadSeqs, LoadTree, PROTEIN, RNA
from cogent.core.tree import TreeError
from cogent.core.alignment import seqs_from_fasta, DenseAlignment
         'but not alignment1 -- did you filter out sequences identifiers' +\
         ' not common to both alignments?'
    return LoadSeqs(data=result,aligned=DenseAlignment)
 
def n_random_seqs(alignment,n):
    # error checking related to the alignment
    try:
       aln = LoadSeqs(alignment_filepath,MolType=PROTEIN,alignment=DenseAlignment)
    except IndexError:
       option_parser.error('Must provide an alignment filepath.')
    coevolve_alignment_function = coevolve_alignment_functions[method_id]
    alphabet_def = alphabets[alphabet_id]
    aln = LoadSeqs(alignment_filepath,moltype=PROTEIN,aligned=DenseAlignment)
 
    if tree_filepath != None:

src/p/y/pycogent-HEAD/cogent/evolve/coevolution.py   pycogent(Download)
from cogent.parse.record import FileFormatError
from cogent.evolve.substitution_model import SubstitutionModel
from cogent import LoadSeqs, LoadTree, PROTEIN, RNA
from cogent.core.tree import TreeError
from cogent.core.alignment import seqs_from_fasta, DenseAlignment
         'but not alignment1 -- did you filter out sequences identifiers' +\
         ' not common to both alignments?'
    return LoadSeqs(data=result,aligned=DenseAlignment)
 
def n_random_seqs(alignment,n):
    # error checking related to the alignment
    try:
       aln = LoadSeqs(alignment_filepath,MolType=PROTEIN,alignment=DenseAlignment)
    except IndexError:
       option_parser.error('Must provide an alignment filepath.')
    coevolve_alignment_function = coevolve_alignment_functions[method_id]
    alphabet_def = alphabets[alphabet_id]
    aln = LoadSeqs(alignment_filepath,moltype=PROTEIN,aligned=DenseAlignment)
 
    if tree_filepath != None:

src/c/o/cogent-1.5.3/cogent/parse/fasta.py   cogent(Download)
                if DEBUG:
                    print "GroupParser collection keys", current_collection.keys()
                seqs = cogent.LoadSeqs(data=current_collection, moltype=moltype,
                                aligned=aligned)
                seqs.Info = info
                yield seqs
            current_collection = {label: seq}
            group_ids.append(label.Info[group_key])
    info = Info(Group=group_ids[-1])
    seqs = cogent.LoadSeqs(data=current_collection, moltype=moltype,

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