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

All Samples(12)  |  Call(9)  |  Derive(0)  |  Import(3)

src/s/e/seq_crumbs-HEAD/crumbs/filters.py   seq_crumbs(Download)
from crumbs.statistics import calculate_dust_score, IntCounter, draw_histogram
from crumbs.settings import get_setting
from crumbs.mapping import (get_or_create_bowtie2_index, map_with_bowtie2,
                            map_process_to_bam, sort_mapped_reads,
                            get_or_create_bwa_index, map_with_bwamem,
    def _setup_checks(self, filterpacket):
        index_fpath = self._index_fpath
        get_or_create_bowtie2_index(index_fpath)
        seqs = [s for seqs in filterpacket[SEQS_PASSED]for s in seqs]
        seq_class = seqs[0].kind

src/s/e/seq_crumbs-HEAD/test/test_mapping.py   seq_crumbs(Download)
from crumbs.utils.test_utils import TEST_DATA_DIR
from test.test_filters import GENOME
from crumbs.mapping import (get_or_create_bowtie2_index, _bowtie2_index_exists,
                            map_with_bowtie2, get_or_create_bwa_index,
                            _bwa_index_exists, map_with_bwamem,
 
        directory = TemporaryDir()
        index_fpath = get_or_create_bowtie2_index(seq_fpath, directory.name)
        expected_index = os.path.join(directory.name,
                                      os.path.basename(db_name))
        assert index_fpath == expected_index
        assert _bowtie2_index_exists(index_fpath)
 
        # already exists
        index_fpath = get_or_create_bowtie2_index(seq_fpath, directory.name)
    def test_map_with_bowtie2(self):
        reference_fpath = os.path.join(TEST_DATA_DIR, 'arabidopsis_genes')
        reads_fpath = os.path.join(TEST_DATA_DIR, 'arabidopsis_reads.fastq')
        directory = TemporaryDir()
        index_fpath = get_or_create_bowtie2_index(reference_fpath,
        paired_fpaths = [[forward_fpath], [reverse_fpath]]
        directory = TemporaryDir()
        index_fpath = get_or_create_bowtie2_index(reference_fpath,
                                                  directory.name)
        bam_fhand = NamedTemporaryFile(suffix='.bam')

src/s/e/seq_crumbs-HEAD/test/test_filters.py   seq_crumbs(Download)
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
 
    def test_filter_by_bowtie2():
        directory = TemporaryDir()
        index_fpath = get_or_create_bowtie2_index(os.path.join(TEST_DATA_DIR,
                                                          'arabidopsis_genes'),
                                                  directory=directory.name)
    def test_filter_by_bowtie2_bin():
        filter_bin = os.path.join(BIN_DIR, 'filter_by_bowtie2')
        assert 'usage' in check_output([filter_bin, '-h'])
        directory = TemporaryDir()
        index_fpath = get_or_create_bowtie2_index(os.path.join(TEST_DATA_DIR,