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

All Samples(8)  |  Call(6)  |  Derive(0)  |  Import(2)

src/c/o/cogent-1.5.3/tests/test_parse/test_stockholm.py   cogent(Download)
"""
 
from cogent.parse.stockholm import is_gf_line, is_gc_line, is_gs_line, \
    is_gr_line, is_seq_line, is_structure_line, GfToInfo, GcToInfo, GsToInfo, \
    GrToInfo, MinimalStockholmParser, StockholmFinder, \
        # no header shouldn't be a problem
        headers, aln, struct = \
            list(MinimalStockholmParser(self._fake_record_no_headers,\
                strict=False))[0]
        self.assertEqual((headers,aln.todict(),str(struct)), \
        # half records or sequences
        result = MinimalStockholmParser(\
            self._fake_record_bad_sequence_1,strict=False)
        self.assertEqual(len(list(MinimalStockholmParser(\
            self._fake_record_bad_sequence_1,strict=False))[0][1].NamedSeqs), 3)            
 
        data = []
        for r in MinimalStockholmParser(self._fake_two_records, strict=False):
            data.append(r)
        self.assertEqual(\

src/p/y/pycogent-HEAD/tests/test_parse/test_stockholm.py   pycogent(Download)
"""
 
from cogent.parse.stockholm import is_gf_line, is_gc_line, is_gs_line, \
    is_gr_line, is_seq_line, is_structure_line, GfToInfo, GcToInfo, GsToInfo, \
    GrToInfo, MinimalStockholmParser, StockholmFinder, \
        # no header shouldn't be a problem
        headers, aln, struct = \
            list(MinimalStockholmParser(self._fake_record_no_headers,\
                strict=False))[0]
        self.assertEqual((headers,aln.todict(),str(struct)), \
        # half records or sequences
        result = MinimalStockholmParser(\
            self._fake_record_bad_sequence_1,strict=False)
        self.assertEqual(len(list(MinimalStockholmParser(\
            self._fake_record_bad_sequence_1,strict=False))[0][1].NamedSeqs), 3)            
 
        data = []
        for r in MinimalStockholmParser(self._fake_two_records, strict=False):
            data.append(r)
        self.assertEqual(\