本文整理匯總了Python中paleomix.common.formats.msa.MSA.reduce方法的典型用法代碼示例。如果您正苦於以下問題:Python MSA.reduce方法的具體用法?Python MSA.reduce怎麽用?Python MSA.reduce使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類paleomix.common.formats.msa.MSA
的用法示例。
在下文中一共展示了MSA.reduce方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_msa_reduce__multiple_empty_column__all_empty_column_are_removed
# 需要導入模塊: from paleomix.common.formats.msa import MSA [as 別名]
# 或者: from paleomix.common.formats.msa.MSA import reduce [as 別名]
def test_msa_reduce__multiple_empty_column__all_empty_column_are_removed():
fa_1 = FASTA("Name_A", "Meta_A", "-AnTN")
fa_2 = FASTA("Name_B", "Meta_B", "NC-NN")
initial = MSA([fa_1, fa_2])
fa_reduced_1 = FASTA("Name_A", "Meta_A", "AT")
fa_reduced_2 = FASTA("Name_B", "Meta_B", "CN")
expected = MSA([fa_reduced_1, fa_reduced_2])
assert_equal(initial.reduce(), expected)
示例2: test_msa_reduce__only_empty_column__none_is_returned
# 需要導入模塊: from paleomix.common.formats.msa import MSA [as 別名]
# 或者: from paleomix.common.formats.msa.MSA import reduce [as 別名]
def test_msa_reduce__only_empty_column__none_is_returned():
fa_1 = FASTA("Name_A", "Meta_A", "---Nn")
fa_2 = FASTA("Name_B", "Meta_B", "Nn--N")
initial = MSA([fa_1, fa_2])
assert_equal(initial.reduce(), None)
示例3: test_msa_reduce__no_empty_columns__no_columns_are_removed
# 需要導入模塊: from paleomix.common.formats.msa import MSA [as 別名]
# 或者: from paleomix.common.formats.msa.MSA import reduce [as 別名]
def test_msa_reduce__no_empty_columns__no_columns_are_removed():
fa_1 = FASTA("Name_A", "Meta_A", "ACnT")
fa_2 = FASTA("Name_B", "Meta_B", "C-TN")
initial = MSA([fa_1, fa_2])
expected = MSA([fa_1, fa_2])
assert_equal(initial.reduce(), expected)