def test_parse_easel_output(self): obs = parse_easel_output(self.fp_infernal) self.assertEqual('INFERNAL', obs['software'].iloc[0]) self.assertEqual('1.1.2', obs['software version'].iloc[0]) self.assertEqual('Markergenes/FSSC/allFSSC.cm', obs['fp_query'].iloc[0]) self.assertEqual('Sequences_Fusarium/taxid_99000016/FW16.genome.fna', obs['fp_target'].iloc[0]) with open(get_data_path('easel2sam/exp_parse_easle_output.txt')) as f: exp = ''.join(f.readlines()) assert_frame_equal(_str2pd(exp), obs) obs = parse_easel_output(self.fp_nohit) self.assertEqual(obs.shape[0], 0)
def test_easle2sam(self): with open(self.fp_sam, 'r') as f: exp = ''.join(f.readlines()) obs = easle2sam(parse_easel_output(self.fp_infernal)) self.assertEqual(exp, obs)
def test_parse_easel_output_format113(self): obs = parse_easel_output( get_data_path('easel2sam/SLCC2753.RF014787.cmout')) # just test if the new format (since 1.1.3) can be parsed to 17 hits self.assertEqual(obs.shape[0], 17)