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

All Samples(19)  |  Call(12)  |  Derive(0)  |  Import(7)

src/q/i/qiime-1.8.0/qiime/denoiser/preprocess.py   qiime(Download)
from qiime.util import get_tmp_filename
from cogent.parse.flowgram import Flowgram, build_averaged_flowgram
from cogent.parse.flowgram_parser import lazy_parse_sff_handle
 
from qiime.util import load_qiime_config, get_qiime_scripts_dir
 
    l = len(mapping)
    (flowgrams, header) = lazy_parse_sff_handle(open(sff_fp))
    #update some values in the sff header
    header["# of Reads"] = l
        if verbose:
            log_fh.write("Cleaned flowgrams written: %d\n" % l)
        flowgrams,header = lazy_parse_sff_handle(open(clean_sff_fp))
        (trunc_sff_fp, l) = truncate_flowgrams_in_SFF(flowgrams, header,
                                                      outdir=out_fp, primer=primer)
        log_fh.write("Filter flowgrams by prefix matching\n")
 
    (flowgrams, header) = lazy_parse_sff_handle(open(trunc_sff_fp))
    l, orig_l, mapping =\
        prefix_filter_flowgrams(flowgrams, squeeze=squeeze)

src/q/i/qiime-1.8.0/qiime/denoiser/utils.py   qiime(Download)
from cogent.app.util import ApplicationNotFoundError,ApplicationError
from cogent.util.misc import app_path, create_dir
from cogent.parse.flowgram_parser import lazy_parse_sff_handle
from qiime.util import (get_qiime_project_dir, get_qiime_scripts_dir,
                        FileFormatError, get_tmp_filename)
    def __iter__(self):
        #make it read_only and reset to start of file
        self.write_mode=False
        self.fh.close()        
        (self.flowgrams, self.header) = lazy_parse_sff_handle(open(self.filename))        
    # get mapping read to cluster
    invert_map = invert_mapping(mapping)
    (flowgrams, header) = lazy_parse_sff_handle(open(sff_fp))
 
    leftover_fasta_fh = open(outdir + "/singletons.fasta", "w")

src/q/i/qiime-1.8.0/qiime/denoiser/flowgram_clustering.py   qiime(Download)
from cogent.app.util import ApplicationNotFoundError, ApplicationError
from qiime.util import get_tmp_filename
from cogent.parse.flowgram_parser import lazy_parse_sff_handle
from cogent.parse.flowgram import Flowgram, seq_to_flow
from cogent.parse.flowgram_collection import FlowgramCollection
           return
 
       (flowgrams, header) = lazy_parse_sff_handle(open(sff_file))
 
       counter = 0
    """
 
    (flowgrams, header) = lazy_parse_sff_handle(open(sff_fp))
    l = num_flows
 

src/q/i/qiime-1.8.0/qiime/denoise_wrapper.py   qiime(Download)
from cogent.parse.fasta import MinimalFastaParser
from cogent.util.misc import remove_files, app_path
from cogent.parse.flowgram_parser import lazy_parse_sff_handle
from cogent.app.util import ApplicationNotFoundError, ApplicationError
from cogent.parse.record import RecordError

src/c/o/cogent-1.5.3/tests/test_parse/test_flowgram_parser.py   cogent(Download)
from types import GeneratorType
from cogent.util.unit_test import TestCase, main
from cogent.parse.flowgram_parser import get_header_info, get_summaries,\
    get_all_summaries, split_summary, parse_sff, lazy_parse_sff_handle
 
    def test_lazy_parse_sff_handle(self):
        """LazySFParser should read in the SFF file correctly."""
        flows, head = lazy_parse_sff_handle(self.rec)
        flows = list(flows)
        self.assertEqual(len(flows),2)

src/p/y/pycogent-HEAD/tests/test_parse/test_flowgram_parser.py   pycogent(Download)
from types import GeneratorType
from cogent.util.unit_test import TestCase, main
from cogent.parse.flowgram_parser import get_header_info, get_summaries,\
    get_all_summaries, split_summary, parse_sff, lazy_parse_sff_handle
 
    def test_lazy_parse_sff_handle(self):
        """LazySFParser should read in the SFF file correctly."""
        flows, head = lazy_parse_sff_handle(self.rec)
        flows = list(flows)
        self.assertEqual(len(flows),2)

src/q/i/qiime-1.8.0/tests/test_denoiser/test_flowgram_filter.py   qiime(Download)
from cogent.parse.flowgram_collection import FlowgramCollection
from cogent.parse.flowgram import Flowgram
from cogent.parse.flowgram_parser import lazy_parse_sff_handle
from qiime.util import get_tmp_filename
 
 
        #With no filters all flowgram should be in out file
        flowgrams,header = lazy_parse_sff_handle(fh)
        filter_list = []
        out_file_name = get_tmp_filename(prefix="test_filter_sff_file", suffix=".sff.txt")
        #With good filters some should survive
        fh = open(self.tiny_test)
        flowgrams,header = lazy_parse_sff_handle(fh)
        filter_list = [lambda f:within_length(f,100,300)]
        out_file_name = get_tmp_filename(prefix="test_filter_sff_file", suffix=".sff.txt")
        #With strong filters nothing should be in 
        fh = open(self.tiny_test)
        flowgrams,header = lazy_parse_sff_handle(fh)
        filter_list = [lambda f:within_length(f,0,0)]
        out_file_name = get_tmp_filename(prefix="test_filter_sff_file", suffix=".sff.txt")