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

All Samples(99)  |  Call(87)  |  Derive(0)  |  Import(12)
SeqWrapper(kind, object, file_format)

src/s/e/seq_crumbs-HEAD/crumbs/mapping.py   seq_crumbs(Download)
import pysam
from crumbs.utils.file_formats import get_format
from crumbs.seq import SeqItem, SeqWrapper, get_str_seq, get_name
from crumbs.utils.tags import SEQITEM
from crumbs.exceptions import IncompatibleFormatError
    else:
        raise IncompatibleFormatError('Not supported format: ' + file_format)
    return SeqWrapper(SEQITEM, SeqItem(name, lines), file_format)
 
 

src/s/e/seq_crumbs-HEAD/crumbs/transcript_orientations.py   seq_crumbs(Download)
from crumbs.utils.seq_utils import append_to_description
from crumbs.utils.tags import SEQRECORD
from crumbs.seq import SeqWrapper
 
 
                                                              dbxrefs=True,
                                                              name=True)
                seq = SeqWrapper(SEQRECORD, rev_seqrecord, None)
                # we mark the reason why it has been reversed
                text = '(reversed because of: {})'.format(reason)

src/s/e/seq_crumbs-HEAD/test/test_filters.py   seq_crumbs(Download)
                               SEQRECORD)
from crumbs.utils.file_utils import TemporaryDir
from crumbs.seq import get_name, get_str_seq, SeqWrapper
from crumbs.mapping import get_or_create_bowtie2_index
from crumbs.seqio import read_seq_packets, read_seqs
    seq = SeqRecord(Seq(string),
                     id=''.join([choice(ascii_lowercase) for i in range(6)]))
    return SeqWrapper(kind=SEQRECORD, object=seq, file_format=None)
 
 
    def test_seq_list_filter(self):
        'It filters the reads given a list of ids'
        seq1 = SeqRecord(Seq('ACTG'), id='seq1')
        seq1 = SeqWrapper(object=seq1, kind=SEQRECORD, file_format=None)
        seq2 = SeqRecord(Seq('ACTG'), id='seq2')
        seq2 = SeqWrapper(object=seq2, kind=SEQRECORD, file_format=None)
    def test_with_pairs(self):
        seq1 = SeqRecord(Seq('ACTG'), id='seq1')
        seq1 = SeqWrapper(object=seq1, kind=SEQRECORD, file_format=None)
        seq2 = SeqRecord(Seq('ACTG'), id='seq2')
        seq2 = SeqWrapper(object=seq2, kind=SEQRECORD, file_format=None)

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
    def test_len(self):
        # with fasta
        seq = SeqItem(name='s1', lines=['>s1\n', 'ACTGGTAC\n'])
        seq = SeqWrapper(SEQITEM, seq, 'fasta')
        assert get_length(seq) == 8
 
        # with fastq
        seq = SeqItem(name='seq',
                      lines=['@seq\n', 'aaaa\n', '+\n', '????\n'])
        seq = SeqWrapper(SEQITEM, seq, 'fastq')
    def test_str_seq(self):
        # with fasta
        seq = SeqItem(name='s1', lines=['>s1\n', 'ACTGGTAC\n'])
        seq = SeqWrapper(SEQITEM, seq, 'fasta')
        assert get_str_seq(seq) == 'ACTGGTAC'
 
        # with fastq
        seq = SeqItem(name='seq',
                      lines=['@seq\n', 'aaaa\n', '+\n', '????\n'])
        seq = SeqWrapper(SEQITEM, seq, 'fastq')

src/s/e/seq_crumbs-HEAD/test/test_trim.py   seq_crumbs(Download)
from crumbs.seq import get_str_seq, get_annotations, get_int_qualities, get_name
from crumbs.seqio import read_seq_packets
from crumbs.seq import SeqWrapper, SeqItem
 
FASTQ = '@seq1\naTCgt\n+\n?????\n@seq2\natcGT\n+\n?????\n'
    def test_trim_seqs():
        'It tests the trim seq function'
        seqs = []
        seqs.append([SeqWrapper(SEQRECORD, SeqRecord(Seq('aaCTTTC')), None)])
        seqs.append([SeqWrapper(SEQRECORD, SeqRecord(Seq('CTTCaa')), None)])
        seqs.append([SeqWrapper(SEQRECORD, SeqRecord(Seq('aaCTCaa')), None)])
        seqs.append([SeqWrapper(SEQRECORD, SeqRecord(Seq('actg')), None)])

src/s/e/seq_crumbs-HEAD/test/test_pairing.py   seq_crumbs(Download)
from crumbs.exceptions import (InterleaveError, PairDirectionError,
                               ItemsNotSortedError)
from crumbs.seq import SeqWrapper, SeqItem
from crumbs.utils.file_formats import set_format
 
        seq = SeqRecord(id=r'seq8:136:FC706VJ:2:2104:15343:197393\1',
                        seq=Seq('ACT'))
        name, dir_ = _parse_pair_direction_and_name(SeqWrapper(SEQRECORD, seq,
                                                               None))
        assert name == 'seq8:136:FC706VJ:2:2104:15343:197393'
def _build_some_paired_seqs():
    seq1 = SeqWrapper(SEQITEM, SeqItem('s1', ['>s1.f\n', 'A\n']), 'fasta')
    seq2 = SeqWrapper(SEQITEM, SeqItem('s1', ['>s1.r\n', 'C\n']), 'fasta')
    seq3 = SeqWrapper(SEQITEM, SeqItem('s2', ['>s2.f\n', 'T\n']), 'fasta')
    seq4 = SeqWrapper(SEQITEM, SeqItem('s2', ['>s2.r\n', 'G\n']), 'fasta')

src/s/e/seq_crumbs-HEAD/test/test_split_mates.py   seq_crumbs(Download)
from crumbs.utils.seq_utils import process_seq_packets
from crumbs.utils.tags import SEQRECORD
from crumbs.seq import get_name, SeqWrapper, get_str_seq
 
TITANIUM_LINKER = get_setting('TITANIUM_LINKER')
    def test_split_mate(self):
        'It tests the function that splits seqs using segments'
        # pylint: disable=W0212
        seq = 'aaatttccctt'
        seq = SeqWrapper(SEQRECORD, SeqRecord(Seq(seq), id='seq'), None)
            seq = seq1 + linker + seq2
            seq = SeqRecord(id='seq_' + str(index), seq=Seq(seq))
            seq = SeqWrapper(SEQRECORD, seq, None)
            return seq
 

src/s/e/seq_crumbs-HEAD/test/test_bulk_filters.py   seq_crumbs(Download)
from StringIO import StringIO
 
from crumbs.seq import SeqWrapper, SeqItem
from crumbs.utils.tags import SEQITEM
from crumbs.bulk_filters import (filter_duplicates, _read_pairs,
    def test_seqitem_pairs_equal(self):
        seq1 = SeqWrapper(SEQITEM, SeqItem('seq1',
                            ['@seq1\n', 'TAATAC\n', '+\n',
                             'TTTDFG\n']), 'fastq')
        seq2 = SeqWrapper(SEQITEM, SeqItem('seq2',
                            ['@seq2\n', 'TCATTA\n', '+\n',
                             'ABCBEG\n']), 'fastq')
        seq3 = SeqWrapper(SEQITEM, SeqItem('seq3',
                            ['@seq3\n', 'TAATAC\n', '+\n',
                             'TTTDFG\n']), 'fastq')
        seq4 = SeqWrapper(SEQITEM, SeqItem('seq4',
                            ['@seq4\n', 'ACGCGT\n', '+\n',
                             'ABCBEG\n']), 'fastq')

src/s/e/seq_crumbs-HEAD/test/test_blast.py   seq_crumbs(Download)
from crumbs.utils.test_utils import TEST_DATA_DIR
from crumbs.utils.tags import NUCL, SEQITEM, SEQRECORD
from crumbs.seq import SeqWrapper, SeqItem, assing_kind_to_seqs
 
TITANIUM_LINKER = get_setting('TITANIUM_LINKER')
        seq += 'ATGACAGCACAAGAAATGTGTATAGGATAATCAGTTTAGATGGCTCAAAGGCAATAATAAAT'
        seq += 'AGTACCATCACCCCAAACATGACA'
        seqrec = SeqWrapper(SEQRECORD, SeqRecord(Seq(seq), id='seq'), None)
        blaster = Blaster([seqrec], 'nr', 'blastn', remote=True)
        print blaster.get_matched_segments('seq')

src/s/e/seq_crumbs-HEAD/test/test_transcriptome_orientation.py   seq_crumbs(Download)
from crumbs.seq import get_str_seq
from crumbs.seqio import read_seqs
from crumbs.seq import SeqWrapper
 
POLYA_ANNOTATOR_MISMATCHES = get_setting('POLYA_ANNOTATOR_MISMATCHES')
 
 
_wrap_seq = lambda seq: SeqWrapper(SEQRECORD, seq, None)
 
 

  1 | 2  Next