本文整理汇总了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)
示例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)
示例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)
示例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="")
示例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)