本文整理汇总了Python中paleomix.common.formats.msa.MSA.from_lines方法的典型用法代码示例。如果您正苦于以下问题:Python MSA.from_lines方法的具体用法?Python MSA.from_lines怎么用?Python MSA.from_lines使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类paleomix.common.formats.msa.MSA
的用法示例。
在下文中一共展示了MSA.from_lines方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_msa_from_lines__empty_name
# 需要导入模块: from paleomix.common.formats.msa import MSA [as 别名]
# 或者: from paleomix.common.formats.msa.MSA import from_lines [as 别名]
def test_msa_from_lines__empty_name():
MSA.from_lines([">", "ACG", ">seq1", "TGAN"])
示例2: test_msa_from_lines__mismatched_lengths
# 需要导入模块: from paleomix.common.formats.msa import MSA [as 别名]
# 或者: from paleomix.common.formats.msa.MSA import from_lines [as 别名]
def test_msa_from_lines__mismatched_lengths():
MSA.from_lines([">seq1", "ACG", ">seq2", "TGAN"])
示例3: test_msa_from_lines__duplicate_names
# 需要导入模块: from paleomix.common.formats.msa import MSA [as 别名]
# 或者: from paleomix.common.formats.msa.MSA import from_lines [as 别名]
def test_msa_from_lines__duplicate_names():
MSA.from_lines([">seq1", "ACG", ">seq1", "TGA"])
示例4: test_msa_from_lines__two_entries_with_meta
# 需要导入模块: from paleomix.common.formats.msa import MSA [as 别名]
# 或者: from paleomix.common.formats.msa.MSA import from_lines [as 别名]
def test_msa_from_lines__two_entries_with_meta():
lines = [">seq1", "ACG", ">seq2 Second meta", "TGA"]
expected = MSA([FASTA("seq1", None, "ACG"),
FASTA("seq2", "Second meta", "TGA")])
result = MSA.from_lines(lines)
assert_equal(result, expected)
示例5: test_msa_from_lines__single_entry_with_meta
# 需要导入模块: from paleomix.common.formats.msa import MSA [as 别名]
# 或者: from paleomix.common.formats.msa.MSA import from_lines [as 别名]
def test_msa_from_lines__single_entry_with_meta():
lines = [">seq1 Meta info", "ACG"]
expected = MSA([FASTA("seq1", "Meta info", "ACG")])
result = MSA.from_lines(lines)
assert_equal(result, expected)
示例6: test_msa_from_lines__single_entry
# 需要导入模块: from paleomix.common.formats.msa import MSA [as 别名]
# 或者: from paleomix.common.formats.msa.MSA import from_lines [as 别名]
def test_msa_from_lines__single_entry():
lines = [">seq1", "ACG"]
result = MSA([FASTA("seq1", None, "ACG")])
assert_equal(MSA.from_lines(lines), result)