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

All Samples(52)  |  Call(36)  |  Derive(0)  |  Import(16)

src/q/i/qiime-1.8.0/qiime/process_sff.py   qiime(Download)
#!/usr/bin/env python
#file process_sff.py
from cogent.util.misc import app_path
from cogent.app.util import ApplicationNotFoundError
from cogent.parse.binary_sff import (
    if output_file is None:
        output_file = StringIO()
    _, reads = parse_binary_sff(sff_file)
    for read in reads:
        output_file.write(format_read_as_fna(read, qual))
            stdout=open(os.devnull, 'w'))
    else:
        header, reads = adjust_sff_cycles(parse_binary_sff(qiime_open(sff_fp, 'rb'),
                                          True), 100)
        write_binary_sff(open(output_fp, 'w'), header, reads)

src/q/i/qiime-HEAD/qiime/process_sff.py   qiime(Download)
 
from skbio.app.util import ApplicationNotFoundError
from cogent.parse.binary_sff import (
    parse_binary_sff, format_binary_sff, write_binary_sff, decode_accession,
)
    if output_file is None:
        output_file = StringIO()
    _, reads = parse_binary_sff(sff_file)
    for read in reads:
        output_file.write(format_read_as_fna(read, qual))
    else:
        header, reads = adjust_sff_cycles(
            parse_binary_sff(qiime_open(sff_fp, 'rb'),
                             True), 100)
        write_binary_sff(open(output_fp, 'w'), header, reads)

src/q/i/qiime-1.8.0/qiime/trim_sff_primers.py   qiime(Download)
from cogent.app.util import ApplicationNotFoundError
from qiime.parse import parse_mapping_file
from cogent.parse.binary_sff import (
    parse_binary_sff, write_binary_sff
    )
        except KeyError:
            continue
        sff_data = parse_binary_sff(open(sff_fp), True)
        clipped_header, clipped_reads = set_clip_qual_left(sff_data, readlength)
 

src/q/i/qiime-1.8.0/qiime/make_per_library_sff.py   qiime(Download)
    check_sfffile,
    )
from cogent.parse.binary_sff import (
    parse_binary_sff, write_binary_sff,
    )
def make_per_library_sff(sff_fps, id_list_fp, debug=False):
    id_list_basepath, _ = os.path.splitext(id_list_fp)
    output_fp = id_list_basepath + '.sff'
 
    sff_datasets = [parse_binary_sff(open(fp), True) for fp in sff_fps]

src/q/i/qiime-HEAD/qiime/trim_sff_primers.py   qiime(Download)
 
from skbio.app.util import ApplicationNotFoundError
from cogent.parse.binary_sff import parse_binary_sff, write_binary_sff
from skbio.app.util import which
 
        except KeyError:
            continue
        sff_data = parse_binary_sff(open(sff_fp), True)
        clipped_header, clipped_reads = set_clip_qual_left(
            sff_data, readlength)

src/q/i/qiime-HEAD/qiime/make_per_library_sff.py   qiime(Download)
    check_sfffile,
)
from cogent.parse.binary_sff import (
    parse_binary_sff, write_binary_sff,
)
def make_per_library_sff(sff_fps, id_list_fp, debug=False):
    id_list_basepath, _ = os.path.splitext(id_list_fp)
    output_fp = id_list_basepath + '.sff'
 
    sff_datasets = [parse_binary_sff(open(fp), True) for fp in sff_fps]

src/c/o/cogent-1.5.3/tests/test_parse/test_binary_sff.py   cogent(Download)
from unittest import TestCase, main
 
from cogent.parse.binary_sff import (
    seek_pad, parse_common_header, parse_read_header, parse_read_data,
    validate_common_header, parse_read, parse_binary_sff, UnsupportedSffError,
        self.output_file.seek(0)
        observed_header, observed_reads = parse_binary_sff(
            self.output_file, native_flowgram_values=True)
        observed_reads = list(observed_reads)
        self.assertEqual(observed_header, header)
    def test_parse_sff(self):
        header, reads = parse_binary_sff(self.sff_file)
        self.assertEqual(header, COMMON_HEADER)
        counter = 0
        for read in reads:

src/p/y/pycogent-HEAD/tests/test_parse/test_binary_sff.py   pycogent(Download)
from unittest import TestCase, main
 
from cogent.parse.binary_sff import (
    seek_pad, parse_common_header, parse_read_header, parse_read_data,
    validate_common_header, parse_read, parse_binary_sff, UnsupportedSffError,
        self.output_file.seek(0)
        observed_header, observed_reads = parse_binary_sff(
            self.output_file, native_flowgram_values=True)
        observed_reads = list(observed_reads)
        self.assertEqual(observed_header, header)
    def test_parse_sff(self):
        header, reads = parse_binary_sff(self.sff_file)
        self.assertEqual(header, COMMON_HEADER)
        counter = 0
        for read in reads:

src/q/i/qiime-1.8.0/tests/test_trim_sff_primers.py   qiime(Download)
 
from cogent.util.unit_test import TestCase, main
from cogent.parse.binary_sff import (
    parse_binary_sff, write_binary_sff,
    )
    def test_set_sff_trimpoints_with_sfftools(self):
        _, orig_reads = parse_binary_sff(open(self.sff_fp), True)
        orig_reads = list(orig_reads)
 
        set_sff_trimpoints_with_sfftools(self.sff_dir, {'F6AVWTA01': 10})
 
        # Check resultant SFF file
        _, reads = parse_binary_sff(open(self.sff_fp), True)
        for read, orig_read in zip(reads, orig_reads):
            self.assertEqual(read['clip_qual_left'], 11)
    def test_set_sff_trimpoints(self):
        _, orig_reads = parse_binary_sff(open(self.sff_fp), True)
        orig_reads = list(orig_reads)
 
        set_sff_trimpoints(self.sff_dir, {'F6AVWTA01': 10})
 
        _, reads = parse_binary_sff(open(self.sff_fp), True)

src/q/i/qiime-HEAD/tests/test_trim_sff_primers.py   qiime(Download)
 
from unittest import TestCase, main
from cogent.parse.binary_sff import (
    parse_binary_sff, write_binary_sff,
)
    def test_set_sff_trimpoints_with_sfftools(self):
        _, orig_reads = parse_binary_sff(open(self.sff_fp), True)
        orig_reads = list(orig_reads)
 
        set_sff_trimpoints_with_sfftools(self.sff_dir, {'F6AVWTA01': 10})
 
        # Check resultant SFF file
        _, reads = parse_binary_sff(open(self.sff_fp), True)
        for read, orig_read in zip(reads, orig_reads):
            self.assertEqual(read['clip_qual_left'], 11)
    def test_set_sff_trimpoints(self):
        _, orig_reads = parse_binary_sff(open(self.sff_fp), True)
        orig_reads = list(orig_reads)
 
        set_sff_trimpoints(self.sff_dir, {'F6AVWTA01': 10})
 
        _, reads = parse_binary_sff(open(self.sff_fp), True)

  1 | 2  Next