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

All Samples(10)  |  Call(7)  |  Derive(0)  |  Import(3)

        def copy_seq(seqwrapper, seq=None, name=None):
    seq_class = seqwrapper.kind
    seq_obj = seqwrapper.object
    if seq_class == SEQITEM:
        seq = _copy_seqitem(seqwrapper, seq=seq, name=name)
    elif seq_class == SEQRECORD:
        seq_obj = _copy_seqrecord(seq_obj, seq=seq, name=name, id_=name)
        seq = SeqWrapper(kind=seqwrapper.kind, object=seq_obj,
                         file_format=seqwrapper.file_format)
    return seq
        


src/s/e/seq_crumbs-HEAD/crumbs/utils/seq_utils.py   seq_crumbs(Download)
 
from crumbs.utils.tags import UPPERCASE, LOWERCASE, SWAPCASE
from crumbs.seq import get_description, get_name, get_str_seq, copy_seq
 
 
            else:
                raise NotImplementedError()
            seq = copy_seq(seq, seq=str_seq)
            processed_seqs.append(seq)
        return processed_seqs

src/s/e/seq_crumbs-HEAD/crumbs/trim.py   seq_crumbs(Download)
                               ORPHAN_SEQS)
from crumbs.utils.seq_utils import get_uppercase_segments
from crumbs.seq import (copy_seq, get_str_seq, get_annotations, get_length,
                        slice_seq, get_int_qualities, get_name)
from crumbs.utils.segments_utils import (get_longest_segment, get_all_segments,
    if seq.kind == SEQRECORD:
        new_seq = Seq(new_seq, alphabet=seq.object.seq.alphabet)
    return copy_seq(seq, seq=new_seq)
 
 

src/s/e/seq_crumbs-HEAD/test/test_seq.py   seq_crumbs(Download)
import unittest
 
from crumbs.seq import (get_length, get_str_seq, get_int_qualities,
        get_str_qualities, slice_seq, copy_seq, SeqItem, SeqWrapper)
from crumbs.utils.tags import SEQITEM, ILLUMINA_QUALITY
                      annotations={'a': 'b'})
        seq = SeqWrapper(SEQITEM, seq, 'fasta')
        seq2 = copy_seq(seq, seq='ACTG')
        assert seq2.object == SeqItem(name='s1', lines=['>s1\n', 'ACTG\n'],
                                      annotations={'a': 'b'})
                      lines=['@seq\n', 'aaaa\n', '+\n', '!???\n'])
        seq = SeqWrapper(SEQITEM, seq, 'fastq')
        seq2 = copy_seq(seq, seq='ACTG')
        assert seq2.object == SeqItem(name='seq',
                               lines=['@seq\n', 'ACTG\n', '+\n', '!???\n'])
                                         '@AAABBBB\n'])
        seq = SeqWrapper(SEQITEM, seq, 'fastq-illumina')
        seq2 = copy_seq(seq, seq='ACTGactg')
        assert seq2.object == SeqItem(name='seq',
                                      lines=['@seq\n', 'ACTGactg\n', '+\n',
    def test_change_name(self):
        seq = SeqItem(name='seq',
                      lines=['@seq\n', 'aaaa\n', '+seq\n', '!???\n'])
        seq = SeqWrapper(SEQITEM, seq, 'fastq')
        seq = copy_seq(seq, name='seq2')