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


Python StockholmAlignment.from_file方法代码示例

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


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

示例1: test_from_file_GS

# 需要导入模块: from skbio.alignment import StockholmAlignment [as 别名]
# 或者: from skbio.alignment.StockholmAlignment import from_file [as 别名]
 def test_from_file_GS(self):
     sto = StringIO("# STOCKHOLM 1.0\n#=GS seq2 AC 222\n#=GS seq1 AC 111\n"
                    "seq1          ACC-G-GGTA\n"
                    "seq2          TCC-G-GGCA\n//")
     obs_sto = next(StockholmAlignment.from_file(sto, DNA))
     exp_sto = StockholmAlignment(self.seqs, {}, self.GS, {}, {})
     self.assertEqual(obs_sto, exp_sto)
开发者ID:bctaylor,项目名称:scikit-bio,代码行数:9,代码来源:test_alignment.py

示例2: test_from_file_GC

# 需要导入模块: from skbio.alignment import StockholmAlignment [as 别名]
# 或者: from skbio.alignment.StockholmAlignment import from_file [as 别名]
 def test_from_file_GC(self):
     sto = StringIO("# STOCKHOLM 1.0\n"
                    "seq1         ACC-G-GGTA\nseq2         TCC-G-GGCA\n"
                    "#=GC SS_cons (((....)))\n//")
     obs_sto = next(StockholmAlignment.from_file(sto, DNA))
     exp_sto = StockholmAlignment(self.seqs, {}, {}, {}, self.GC)
     self.assertEqual(obs_sto, exp_sto)
开发者ID:bctaylor,项目名称:scikit-bio,代码行数:9,代码来源:test_alignment.py

示例3: test_from_file_alignment

# 需要导入模块: from skbio.alignment import StockholmAlignment [as 别名]
# 或者: from skbio.alignment.StockholmAlignment import from_file [as 别名]
 def test_from_file_alignment(self):
     """make sure can parse basic sto file with interleaved alignment"""
     sto = StringIO(
         "# STOCKHOLM 1.0\n" "seq1      ACC-G\n" "seq2      TCC-G\n\n" "seq1      -GGTA\n" "seq2      -GGCA\n//"
     )
     obs_sto = next(StockholmAlignment.from_file(sto, DNA))
     exp_sto = StockholmAlignment(self.seqs)
     self.assertEqual(obs_sto, exp_sto)
开发者ID:cauyrd,项目名称:scikit-bio,代码行数:10,代码来源:test_alignment.py

示例4: test_from_file_GR

# 需要导入模块: from skbio.alignment import StockholmAlignment [as 别名]
# 或者: from skbio.alignment.StockholmAlignment import from_file [as 别名]
 def test_from_file_GR(self):
     sto = StringIO("# STOCKHOLM 1.0\nseq1          ACC-G\n"
                    "#=GR seq1 SS  11101\nseq2          TCC-G\n"
                    "#=GR seq2 SS  01101\n\nseq1          -GGTA\n"
                    "#=GR seq1 SS  01111\nseq2          -GGCA\n"
                    "#=GR seq2 SS  01110\n//")
     obs_sto = next(StockholmAlignment.from_file(sto, DNA))
     exp_sto = StockholmAlignment(self.seqs, {}, {}, self.GR, {})
     self.assertEqual(obs_sto, exp_sto)
开发者ID:bctaylor,项目名称:scikit-bio,代码行数:11,代码来源:test_alignment.py

示例5: test_from_file_GF

# 需要导入模块: from skbio.alignment import StockholmAlignment [as 别名]
# 或者: from skbio.alignment.StockholmAlignment import from_file [as 别名]
 def test_from_file_GF(self):
     # remove rn line to make sure auto-added
     self.GF.pop("RN")
     sto = StringIO("# STOCKHOLM 1.0\n#=GF RN [1]\n#=GF RM 11469857\n"
                    "#=GF RT TITLE1\n#=GF RA Auth1;\n#=GF RL J Mol Biol\n"
                    "#=GF RN [2]\n#=GF RM 12007400\n#=GF RT TITLE2\n"
                    "#=GF RA Auth2;\n#=GF RL Cell\n#=GF AC RF00360\n"
                    "#=GF BM cmbuild  -F CM SEED\n"
                    "#=GF BM cmsearch  -Z 274931 -E 1000000\n#=GF SQ 9\n"
                    "seq1         ACC-G-GGTA\nseq2         TCC-G-GGCA\n//")
     obs_sto = next(StockholmAlignment.from_file(sto, DNA))
     exp_sto = StockholmAlignment(self.seqs, self.GF, {}, {}, {})
     self.assertEqual(obs_sto, exp_sto)
开发者ID:bctaylor,项目名称:scikit-bio,代码行数:15,代码来源:test_alignment.py

示例6: test_from_file_multi

# 需要导入模块: from skbio.alignment import StockholmAlignment [as 别名]
# 或者: from skbio.alignment.StockholmAlignment import from_file [as 别名]
 def test_from_file_multi(self):
     sto = StringIO("# STOCKHOLM 1.0\n#=GS seq2 AC 222\n#=GS seq1 AC 111\n"
                    "seq1          ACC-G-GGTA\n"
                    "seq2          TCC-G-GGCA\n//\n"
                    "# STOCKHOLM 1.0\nseq1          ACC-G-GGTA\n"
                    "#=GR seq1 SS  1110101111\nseq2          TCC-G-GGCA\n"
                    "#=GR seq2 SS  0110101110\n//")
     obs_sto = StockholmAlignment.from_file(sto, DNA)
     count = 0
     for obs in obs_sto:
         if count == 0:
             exp_sto = StockholmAlignment(self.seqs, {}, self.GS, {}, {})
             self.assertEqual(obs, exp_sto)
         elif count == 1:
             exp_sto = StockholmAlignment(self.seqs, {}, {}, self.GR, {})
             self.assertEqual(obs, exp_sto)
         else:
             raise AssertionError("More than 2 sto alignments parsed!")
         count += 1
开发者ID:bctaylor,项目名称:scikit-bio,代码行数:21,代码来源:test_alignment.py


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