当前位置: 首页>>代码示例>>Python>>正文


Python GFFParser.parse_in_parts方法代码示例

本文整理汇总了Python中BCBio.GFF.GFFParser.parse_in_parts方法的典型用法代码示例。如果您正苦于以下问题:Python GFFParser.parse_in_parts方法的具体用法?Python GFFParser.parse_in_parts怎么用?Python GFFParser.parse_in_parts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BCBio.GFF.GFFParser的用法示例。


在下文中一共展示了GFFParser.parse_in_parts方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: t_gff3_iterator

# 需要导入模块: from BCBio.GFF import GFFParser [as 别名]
# 或者: from BCBio.GFF.GFFParser import parse_in_parts [as 别名]
 def t_gff3_iterator(self):
     """Iterated parsing in GFF3 files with nested features.
     """
     parser = GFFParser()
     recs = [r for r in parser.parse_in_parts(self._test_gff_file,
         target_lines=70)]
     # should be one big set because we don't have a good place to split
     assert len(recs) == 6
     assert len(recs[0].features) == 59
开发者ID:JCVI-Cloud,项目名称:VICVB,代码行数:11,代码来源:test_GFFSeqIOFeatureAdder.py

示例2: t_solid_iterator

# 需要导入模块: from BCBio.GFF import GFFParser [as 别名]
# 或者: from BCBio.GFF.GFFParser import parse_in_parts [as 别名]
 def t_solid_iterator(self):
     """Iterated parsing in a flat file without nested features.
     """
     parser = GFFParser()
     feature_sizes = []
     for rec in parser.parse_in_parts(self._test_gff_file,
             target_lines=5):
         feature_sizes.append(len(rec.features))
     assert len(feature_sizes) == 112
     assert max(feature_sizes) == 1
开发者ID:JCVI-Cloud,项目名称:VICVB,代码行数:12,代码来源:test_GFFSeqIOFeatureAdder.py

示例3: main

# 需要导入模块: from BCBio.GFF import GFFParser [as 别名]
# 或者: from BCBio.GFF.GFFParser import parse_in_parts [as 别名]
def main(in_file):
    base, ext = os.path.splitext(in_file)
    out_file = "%s.gff3" % (base)
    in_handle = open(in_file)
    out_handle = open(out_file, "w")
    reader = GFFParser()
    writer = GFF3Writer()
    writer.write(reader.parse_in_parts(in_handle, target_lines=25000),
            out_handle)
    in_handle.close()
    out_handle.close()
开发者ID:16NWallace,项目名称:bcbb,代码行数:13,代码来源:gff2_to_gff3.py

示例4: t_gff2_iteration

# 需要导入模块: from BCBio.GFF import GFFParser [as 别名]
# 或者: from BCBio.GFF.GFFParser import parse_in_parts [as 别名]
 def t_gff2_iteration(self):
     """Test iterated features with GFF2 files, breaking without parents.
     """
     parser = GFFParser()
     recs = []
     for rec in parser.parse_in_parts(self._wormbase_file, target_lines=15):
         recs.append(rec)
     assert len(recs) == 4
     assert recs[0].features[0].type == 'region'
     assert recs[0].features[1].type == 'SAGE_tag'
     assert len(recs[0].features[2].sub_features) == 29
开发者ID:jamescasbon,项目名称:bcbb,代码行数:13,代码来源:test_GFFSeqIOFeatureAdder.py


注:本文中的BCBio.GFF.GFFParser.parse_in_parts方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。