def testPointfinderResfinder(self):
        amr_detection_summary = AMRDetectionSummaryResistance(self.files, self.resfinder_table, self.pointfinder_table)

        summary = amr_detection_summary.create_summary()

        self.assertEqual(1, len(summary.index), 'Invalid number of rows in results')

        self.assertEqual('file1', summary.index[0], 'File name not equal')
        self.assertEqual('blaIMP-42, gyrA', summary['Genotype'].iloc[0], 'Genes not equal')
        self.assertEqual('ampicillin, amoxi/clav, cefoxitin, ceftriaxone, meropenem, ciprofloxacin I/R, nalidixic acid',
                         summary['Predicted Phenotype'].iloc[0], 'Phenotypes not equal')
    def testResfinderDuplicateResistances(self):
        amr_detection_summary = AMRDetectionSummaryResistance(self.files, self.resfinder_table_duplicate_resistances)

        summary = amr_detection_summary.create_summary()

        self.assertEqual(1, len(summary.index), 'Invalid number of rows in results')

        self.assertEqual('file1', summary.index[0], 'File name not equal')
        self.assertEqual('blaCTX-M-55, blaIMP-42', summary['Genotype'].iloc[0], 'Genes not equal')
        self.assertEqual('ampicillin, ceftriaxone',
                         summary['Predicted Phenotype'].iloc[0], 'Phenotypes not equal')
    def testPointfinder(self):
        amr_detection_summary = AMRDetectionSummaryResistance(self.files, self.resfinder_table_empty,
                                                              self.pointfinder_table)

        summary = amr_detection_summary.create_summary()

        self.assertEqual(1, len(summary.index), 'Invalid number of rows in results')

        self.assertEqual('file1', summary.index[0], 'File name not equal')
        self.assertEqual('gyrA', summary['Genotype'].iloc[0], 'Genes not equal')
        self.assertEqual('ciprofloxacin I/R, nalidixic acid',
                         summary['Predicted Phenotype'].iloc[0], 'Phenotypes not equal')
 def _create_amr_summary(self, files, resfinder_dataframe, quality_module_dataframe,pointfinder_dataframe, plasmidfinder_dataframe, mlst_dataframe):
     amr_detection_summary = AMRDetectionSummaryResistance(files, resfinder_dataframe,quality_module_dataframe,pointfinder_dataframe,
                                                           plasmidfinder_dataframe, mlst_dataframe)
     return amr_detection_summary.create_summary(self._include_negative_results)