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

All Samples(15)  |  Call(11)  |  Derive(0)  |  Import(4)

src/s/e/seq_crumbs-HEAD/crumbs/filters.py   seq_crumbs(Download)
                            alignedread_to_seqitem)
from crumbs.seqio import write_seqs, read_seqs
from crumbs.pairs import group_pairs, group_pairs_by_name, deinterleave_pairs
 
 
    for packet in seq_packets:
        if group_paired_reads:
            packet = list(group_pairs_by_name(packet))
        else:
            packet = list(group_pairs(packet, n_seqs_in_pair=1))

src/s/e/seq_crumbs-HEAD/crumbs/trim.py   seq_crumbs(Download)
from crumbs.blast import BlasterForFewSubjects
from crumbs.seqio import write_seqs
from crumbs.pairs import group_pairs_by_name, group_pairs
 
# pylint: disable=R0903
    for packet in seq_packets:
        if group_paired_reads:
            packet = list(group_pairs_by_name(packet))
        else:
            packet = list(group_pairs(packet, n_seqs_in_pair=1))

src/s/e/seq_crumbs-HEAD/crumbs/bulk_filters.py   seq_crumbs(Download)
 
from crumbs.seq import get_str_seq
from crumbs.pairs import group_pairs_by_name, group_pairs
from crumbs.seqio import read_seqs, write_seqs
from crumbs.utils.tags import SEQITEM
def _read_pairs(in_fhands, paired_reads):
    seqs = read_seqs(in_fhands, prefered_seq_classes=[SEQITEM])
    if paired_reads:
        pairs = group_pairs_by_name(seqs)
    else:

src/s/e/seq_crumbs-HEAD/test/test_pairing.py   seq_crumbs(Download)
from Bio.Seq import Seq
 
from crumbs.pairs import (match_pairs, interleave_pairs, deinterleave_pairs,
                          group_pairs, group_pairs_by_name,
                          _parse_pair_direction_and_name_from_title,
    def test_pair_grouper(self):
        seqs = _build_some_paired_seqs()
        paired_seqs = list(group_pairs_by_name(seqs))
        assert [get_str_seq(s) for s in paired_seqs[0]] == ['A', 'C']
        assert [get_str_seq(s) for s in paired_seqs[1]] == ['T', 'G']
        assert len(paired_seqs) == 2
 
        seqs = seqs[0], seqs[2], seqs[1], seqs[3]
        paired_seqs = list(group_pairs_by_name(seqs))
        seqs = _build_some_paired_seqs()
        seqs = seqs[:-1]
        paired_seqs = list(group_pairs_by_name(seqs))
        assert [get_str_seq(s) for s in paired_seqs[0]] == ['A', 'C']
        assert [get_str_seq(s) for s in paired_seqs[1]] == ['T']
 
        seqs = _build_some_paired_seqs()
        seqs = seqs[:-1]
        try:
            paired_seqs = list(group_pairs_by_name(seqs,