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

All Samples(272)  |  Call(252)  |  Derive(0)  |  Import(20)

src/p/i/picobio-HEAD/assembly_comparison/assembly_comparison.py   picobio(Download)
#(and yes, also the FASTA file to get the query lengths)
blast_data = sorted(filter_blast(b, len(contigs[b.id])) \
                        for b in SearchIO.parse(blast_file, "blast-tab"))
contigs_shown = set()
contigs_shown_bp = 0

src/p/i/picobio-HEAD/assembly_comparison/multi_comparison.py   picobio(Download)
            do_blast(assembly_fasta, reference_fasta, blast_file)
        print("Loading %s" % blast_file)
        for blast_result in SearchIO.parse(blast_file, "blast-tab"):
            blast_result.id = hack_ncbi_fasta_name(blast_result.id)
            contig_id, hits = filter_blast(blast_result, contig_lengths[blast_result.id])

src/b/i/biopython-1.63/Tests/test_SearchIO_blast_tab.py   biopython(Download)
import unittest
 
from Bio.SearchIO import parse
from Bio.SearchIO.BlastIO.blast_tab import _LONG_SHORT_MAP as all_fields
 
    def test_tab_2228_tblastx_001(self):
        "Test parsing TBLASTX 2.2.28+ tabular output (tab_2228_tblastx_001)"
        tab_file = get_file('tab_2228_tblastx_001.txt')
        qresults = list(parse(tab_file, FMT,
                              fields=list(all_fields.values()),
    def test_tab_2226_tblastn_001(self):
        "Test parsing TBLASTN 2.2.26+ tabular output (tab_2226_tblastn_001)"
 
        xml_file = get_file('tab_2226_tblastn_001.txt')
        qresults = parse(xml_file, FMT)
    def test_tab_2226_tblastn_002(self):
        "Test parsing TBLASTN 2.2.26+ tabular output (tab_2226_tblastn_002)"
 
        xml_file = get_file('tab_2226_tblastn_002.txt')
        qresults = parse(xml_file, FMT)
    def test_tab_2226_tblastn_003(self):
        "Test parsing TBLASTN 2.2.26+ tabular output (tab_2226_tblastn_003)"
 
        xml_file = get_file('tab_2226_tblastn_003.txt')
        qresults = parse(xml_file, FMT)

src/b/i/biopython-HEAD/Tests/test_SearchIO_blast_tab.py   biopython(Download)
with warnings.catch_warnings():
   warnings.simplefilter('ignore', BiopythonExperimentalWarning)
   from Bio.SearchIO import parse
   from Bio.SearchIO.BlastIO.blast_tab import _LONG_SHORT_MAP as all_fields
 
    def test_tab_2228_tblastx_001(self):
        "Test parsing TBLASTX 2.2.28+ tabular output (tab_2228_tblastx_001)"
        tab_file = get_file('tab_2228_tblastx_001.txt')
        qresults = list(parse(tab_file, FMT,
                              fields=list(all_fields.values()),
    def test_tab_2226_tblastn_001(self):
        "Test parsing TBLASTN 2.2.26+ tabular output (tab_2226_tblastn_001)"
 
        xml_file = get_file('tab_2226_tblastn_001.txt')
        qresults = parse(xml_file, FMT)
    def test_tab_2226_tblastn_002(self):
        "Test parsing TBLASTN 2.2.26+ tabular output (tab_2226_tblastn_002)"
 
        xml_file = get_file('tab_2226_tblastn_002.txt')
        qresults = parse(xml_file, FMT)
    def test_tab_2226_tblastn_003(self):
        "Test parsing TBLASTN 2.2.26+ tabular output (tab_2226_tblastn_003)"
 
        xml_file = get_file('tab_2226_tblastn_003.txt')
        qresults = parse(xml_file, FMT)

src/b/i/biopython-1.63/Tests/test_SearchIO_blat_psl.py   biopython(Download)
import unittest
 
from Bio.SearchIO import parse
 
# test case files are in the Blast directory
    def test_psl_34_001(self, testf='psl_34_001.psl', pslx=False):
        """Test parsing blat output (psl_34_001.psl)"""
        blat_file = get_file(testf)
        self.qresults = list(parse(blat_file, FMT, pslx=pslx))
        self.assertEqual(2, len(self.qresults))
    def test_psl_34_002(self, testf='psl_34_002.psl', pslx=False):
        """Test parsing blat output (psl_34_001.psl)"""
        blat_file = get_file(testf)
        self.qresults = list(parse(blat_file, FMT, pslx=pslx))
        self.assertEqual(0, len(self.qresults))
 
    def test_psl_34_003(self, testf='psl_34_003.psl', pslx=False):
        """Test parsing blat output (psl_34_003.psl)"""
        blat_file = get_file(testf)
        self.qresults = list(parse(blat_file, FMT, pslx=pslx))
    def test_psl_34_004(self, testf='psl_34_004.psl', pslx=False):
        """Test parsing blat output (psl_34_004.psl)"""
        blat_file = get_file(testf)
        self.qresults = list(parse(blat_file, FMT, pslx=pslx))
        self.assertEqual(1, len(self.qresults))

src/b/i/biopython-HEAD/Tests/test_SearchIO_blat_psl.py   biopython(Download)
with warnings.catch_warnings():
   warnings.simplefilter('ignore', BiopythonExperimentalWarning)
   from Bio.SearchIO import parse
 
# test case files are in the Blast directory
    def test_psl_34_001(self, testf='psl_34_001.psl', pslx=False):
        """Test parsing blat output (psl_34_001.psl)"""
        blat_file = get_file(testf)
        self.qresults = list(parse(blat_file, FMT, pslx=pslx))
        self.assertEqual(2, len(self.qresults))
    def test_psl_34_002(self, testf='psl_34_002.psl', pslx=False):
        """Test parsing blat output (psl_34_001.psl)"""
        blat_file = get_file(testf)
        self.qresults = list(parse(blat_file, FMT, pslx=pslx))
        self.assertEqual(0, len(self.qresults))
 
    def test_psl_34_003(self, testf='psl_34_003.psl', pslx=False):
        """Test parsing blat output (psl_34_003.psl)"""
        blat_file = get_file(testf)
        self.qresults = list(parse(blat_file, FMT, pslx=pslx))
    def test_psl_34_004(self, testf='psl_34_004.psl', pslx=False):
        """Test parsing blat output (psl_34_004.psl)"""
        blat_file = get_file(testf)
        self.qresults = list(parse(blat_file, FMT, pslx=pslx))
        self.assertEqual(1, len(self.qresults))

src/b/i/biopython-1.63/Tests/test_SearchIO_write.py   biopython(Download)
    def parse_write_and_compare(self, source_file, source_format, out_file,
            out_format, **kwargs):
        """Compares parsed QueryResults after they have been written to a file."""
        source_qresults = list(SearchIO.parse(source_file, source_format,
                **kwargs))
        SearchIO.write(source_qresults, out_file, out_format, **kwargs)
        out_qresults = list(SearchIO.parse(out_file, out_format, **kwargs))

src/b/i/biopython-HEAD/Tests/test_SearchIO_write.py   biopython(Download)
    def parse_write_and_compare(self, source_file, source_format, out_file,
            out_format, **kwargs):
        """Compares parsed QueryResults after they have been written to a file."""
        source_qresults = list(SearchIO.parse(source_file, source_format,
                **kwargs))
        SearchIO.write(source_qresults, out_file, out_format, **kwargs)
        out_qresults = list(SearchIO.parse(out_file, out_format, **kwargs))

src/b/i/biopython-1.63/Tests/search_tests_common.py   biopython(Download)
        if filename.endswith(".bgz"):
            handle = gzip.open(filename)
            parsed = list(SearchIO.parse(handle, format, **kwargs))
            handle.close()
        else:
            parsed = list(SearchIO.parse(filename, format, **kwargs))

src/b/i/biopython-HEAD/Tests/search_tests_common.py   biopython(Download)
        if filename.endswith(".bgz"):
            handle = gzip.open(filename)
            parsed = list(SearchIO.parse(handle, format, **kwargs))
            handle.close()
        else:
            parsed = list(SearchIO.parse(filename, format, **kwargs))

  1 | 2 | 3  Next