本文整理匯總了Python中process.sequence.AlignmentList.outlier_sequence_size_sp方法的典型用法代碼示例。如果您正苦於以下問題:Python AlignmentList.outlier_sequence_size_sp方法的具體用法?Python AlignmentList.outlier_sequence_size_sp怎麽用?Python AlignmentList.outlier_sequence_size_sp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類process.sequence.AlignmentList
的用法示例。
在下文中一共展示了AlignmentList.outlier_sequence_size_sp方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: SeconaryOpsTest
# 需要導入模塊: from process.sequence import AlignmentList [as 別名]
# 或者: from process.sequence.AlignmentList import outlier_sequence_size_sp [as 別名]
class SeconaryOpsTest(unittest.TestCase):
def setUp(self):
if not os.path.exists(temp_dir):
os.makedirs(temp_dir)
self.aln_obj = AlignmentList(dna_data_fas, sql_db=sql_db)
def tearDown(self):
self.aln_obj.clear_alignments()
self.aln_obj.con.close()
shutil.rmtree(temp_dir)
def test_summary_stats_all(self):
sum_table, table_data = self.aln_obj.get_summary_stats()
self.assertEqual([sum_table, table_data],
[{'missing': '5 (0.04%)', 'taxa': 24, 'genes': 7,
'informative': '0 (0.0%)', 'gaps': '0 (0.0%)',
'avg_gaps': 0.0, 'avg_missing': 1.0, 'variable': '7 (1.18%)',
'seq_len': 595, 'avg_var': 1.0, 'avg_inf': 0.0},
[['Genes', 'Taxa', 'Alignment length', 'Gaps',
'Gaps per gene', 'Missing data',
'Missing data per gene', 'Variable sites',
'Variable sites per gene', 'Informative sites',
'Informative sites per gene'],
[7, 24, 595, '0 (0.0%)', 0.0, '5 (0.04%)', 1.0,
'7 (1.18%)', 1.0, '0 (0.0%)', 0.0]]])
def test_summary_stats_one_active(self):
sum_table, table_data = self.aln_obj.get_summary_stats([
join(data_path, "BaseConc1.fas")])
self.assertEqual([sum_table, table_data],
[{'missing': '1 (0.05%)', 'taxa': 24, 'genes': 1,
'informative': '0 (0.0%)', 'gaps': '0 (0.0%)',
'avg_gaps': 0.0, 'avg_missing': 1.0, 'variable': '1 (1.18%)',
'seq_len': 85, 'avg_var': 1.0, 'avg_inf': 0.0},
[['Genes', 'Taxa', 'Alignment length', 'Gaps',
'Gaps per gene', 'Missing data',
'Missing data per gene', 'Variable sites',
'Variable sites per gene', 'Informative sites',
'Informative sites per gene'],
[1, 24, 85, '0 (0.0%)', 0.0, '1 (0.05%)', 1.0,
'1 (1.18%)', 1.0, '0 (0.0%)', 0.0]]])
def test_single_aln_outlier_mdata(self):
self.aln_obj.update_active_alignments([dna_data_fas[0]])
self.assertEqual(self.aln_obj.outlier_missing_data(),
{"exception": "single_alignment"})
def test_single_aln_outlier_mdata_sp(self):
self.aln_obj.update_active_alignments([dna_data_fas[0]])
print(self.aln_obj.alignments)
self.assertEqual(self.aln_obj.outlier_missing_data_sp(),
{"exception": "single_alignment"})
def test_single_aln_outlier_seg(self):
self.aln_obj.update_active_alignments([dna_data_fas[0]])
self.assertEqual(self.aln_obj.outlier_segregating(),
{"exception": "single_alignment"})
def test_single_aln_outlier_seg_sp(self):
self.aln_obj.update_active_alignments([dna_data_fas[0]])
print(self.aln_obj.alignments)
self.assertEqual(self.aln_obj.outlier_segregating_sp(),
{"exception": "single_alignment"})
def test_single_aln_outlier_seqsize(self):
self.aln_obj.update_active_alignments([dna_data_fas[0]])
self.assertEqual(self.aln_obj.outlier_sequence_size(),
{"exception": "single_alignment"})
def test_single_aln_outlier_seqsize_sp(self):
self.aln_obj.update_active_alignments([dna_data_fas[0]])
self.assertEqual(self.aln_obj.outlier_sequence_size_sp(),
{"exception": "single_alignment"})
def test_single_aln_average_seqsize_per_species(self):
self.aln_obj.update_active_alignments([dna_data_fas[0]])
#.........這裏部分代碼省略.........