def test_iro_incomplete(self): """ This test is an exact match for only one allele. """ results = get_iro_mlst_results(self.mlstblast, self.data_folder, 'test/test_iro_4.fasta') self.assertEqual(results['iroB'], '-') self.assertEqual(results['iroC'], '1') self.assertEqual(results['iroD'], '-') self.assertEqual(results['iroN'], '-') self.assertEqual(results['Salmochelin'], '-') self.assertEqual(results['SmST'], '0')
def test_iro_novel(self): """ This test is an exact match for alleles, but an unknown combination. """ results = get_iro_mlst_results(self.mlstblast, self.data_folder, 'test/test_iro_3.fasta') self.assertEqual(results['iroB'], '11') self.assertEqual(results['iroC'], '1') self.assertEqual(results['iroD'], '18') self.assertEqual(results['iroN'], '5') self.assertEqual(results['Salmochelin'], 'iro unknown') self.assertEqual(results['SmST'], '0')
def test_iro_exact(self): """ This test is an exact match for SmST33. """ results = get_iro_mlst_results(self.mlstblast, self.data_folder, 'test/test_iro_1.fasta') self.assertEqual(results['iroB'], '22') self.assertEqual(results['iroC'], '33') self.assertEqual(results['iroD'], '12') self.assertEqual(results['iroN'], '15') self.assertEqual(results['Salmochelin'], 'iro 2') self.assertEqual(results['SmST'], '33')
def test_iro_random(self): """ This test has just random sequence and should give no iro call. """ results = get_iro_mlst_results(self.mlstblast, self.data_folder, 'test/test_random.fasta') self.assertEqual(results['iroB'], '-') self.assertEqual(results['iroC'], '-') self.assertEqual(results['iroD'], '-') self.assertEqual(results['iroN'], '-') self.assertEqual(results['Salmochelin'], '-') self.assertEqual(results['SmST'], '0')
def test_iro_inexact(self): """ This test is an inexact match for SmST33. There are single base changes in iroC and in iroN. """ results = get_iro_mlst_results(self.mlstblast, self.data_folder, 'test/test_iro_2.fasta') self.assertEqual(results['iroB'], '22') self.assertEqual(results['iroC'], '33*') self.assertEqual(results['iroD'], '12') self.assertEqual(results['iroN'], '15*') self.assertEqual(results['Salmochelin'], 'iro 2') self.assertEqual(results['SmST'], '33-2LV')
def get_all_results(self, contigs): results = {'strain': get_strain_name(contigs)} results.update(get_contig_stat_results(contigs)) results.update(get_species_results(contigs, self.data_dir)) kp_complex = is_kp_complex(results) results.update( get_chromosome_mlst_results(self.data_dir, contigs, kp_complex)) results.update(get_ybt_mlst_results(self.data_dir, contigs)) results.update(get_clb_mlst_results(self.data_dir, contigs)) results.update(get_iuc_mlst_results(self.data_dir, contigs)) results.update(get_iro_mlst_results(self.data_dir, contigs)) results.update(get_hypermucoidy_results(self.data_dir, contigs)) results.update(get_wzi_and_k_locus_results(self.data_dir, contigs)) results.update( get_resistance_results(self.data_dir, contigs, self.args, self.res_headers, kp_complex)) results.update(get_summary_results(results, self.res_headers)) return results