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


Python MSA.split方法代码示例

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


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

示例1: test_msa_split_msa__two_groups

# 需要导入模块: from paleomix.common.formats.msa import MSA [as 别名]
# 或者: from paleomix.common.formats.msa.MSA import split [as 别名]
def test_msa_split_msa__two_groups():
    msa = MSA([FASTA("seq1", None, "ACGCAT"),
               FASTA("seq2", None, "GAGTGA")])
    expected = {"1": MSA([FASTA("seq1", None, "ACCA"),
                          FASTA("seq2", None, "GATG")]),
                "2": MSA([FASTA("seq1", None, "GT"),
                          FASTA("seq2", None, "GA")])}
    assert_equal(msa.split("112"), expected)
开发者ID:MikkelSchubert,项目名称:paleomix,代码行数:10,代码来源:msa_test.py

示例2: test_msa_split__partial_group

# 需要导入模块: from paleomix.common.formats.msa import MSA [as 别名]
# 或者: from paleomix.common.formats.msa.MSA import split [as 别名]
def test_msa_split__partial_group():
    msa = MSA([FASTA("seq1", None, "ACGCA"),
               FASTA("seq2", None, "GAGTG")])
    expected = {"1": MSA([FASTA("seq1", None, "AC"),
                          FASTA("seq2", None, "GT")]),
                "2": MSA([FASTA("seq1", None, "CA"),
                          FASTA("seq2", None, "AG")]),
                "3": MSA([FASTA("seq1", None, "G"),
                          FASTA("seq2", None, "G")])}
    assert_equal(msa.split("123"), expected)
开发者ID:MikkelSchubert,项目名称:paleomix,代码行数:12,代码来源:msa_test.py

示例3: test_msa_split__empty_group

# 需要导入模块: from paleomix.common.formats.msa import MSA [as 别名]
# 或者: from paleomix.common.formats.msa.MSA import split [as 别名]
def test_msa_split__empty_group():
    msa = MSA([FASTA("seq1", None, "AC"),
               FASTA("seq2", None, "GA")])
    expected = {"1": MSA([FASTA("seq1", None, "A"),
                          FASTA("seq2", None, "G")]),
                "2": MSA([FASTA("seq1", None, "C"),
                          FASTA("seq2", None, "A")]),
                "3": MSA([FASTA("seq1", None, ""),
                          FASTA("seq2", None, "")])}
    assert_equal(msa.split("123"), expected)
开发者ID:MikkelSchubert,项目名称:paleomix,代码行数:12,代码来源:msa_test.py

示例4: test_msa_split_msa__no_split_by

# 需要导入模块: from paleomix.common.formats.msa import MSA [as 别名]
# 或者: from paleomix.common.formats.msa.MSA import split [as 别名]
def test_msa_split_msa__no_split_by():
    msa = MSA([FASTA("seq1", None, "ACG"),
               FASTA("seq2", None, "GAT")])
    msa.split(split_by="")
开发者ID:MikkelSchubert,项目名称:paleomix,代码行数:6,代码来源:msa_test.py

示例5: test_msa_split_msa__single_group

# 需要导入模块: from paleomix.common.formats.msa import MSA [as 别名]
# 或者: from paleomix.common.formats.msa.MSA import split [as 别名]
def test_msa_split_msa__single_group():
    msa = MSA([FASTA("seq1", None, "ACGCAT"),
               FASTA("seq2", None, "GAGTGA")])
    expected = {'1': copy.copy(msa)}
    assert_equal(msa.split("111"), expected)
开发者ID:MikkelSchubert,项目名称:paleomix,代码行数:7,代码来源:msa_test.py


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