def test_apply_pik3ca_class_a_test2(self): input_symbol2gene = {"PIK3CA": self._pik3ca_gene_missense_a_and_b} rule = AlasccaClassRule("reportgen/assets/ALASCCA_MUTATION_TABLE_SPECIFIC.xlsx", input_symbol2gene) test_report = rule.apply() expected_output_dict = { AlasccaClassReport.ALASCCA_CLASS_FEATURENAME: AlasccaClassReport.MUTN_CLASS_A} self.assertDictEqual(test_report.to_dict(), expected_output_dict)
def test_apply_single_pik3r1_missense(self): input_symbol2gene = {"PIK3R1": self._pik3r1_gene_missense} rule = AlasccaClassRule("reportgen/assets/ALASCCA_MUTATION_TABLE_SPECIFIC.xlsx", input_symbol2gene) test_report = rule.apply() expected_output_dict = { AlasccaClassReport.ALASCCA_CLASS_FEATURENAME: AlasccaClassReport.MUTN_CLASS_B} self.assertDictEqual(test_report.to_dict(), expected_output_dict)
def test_apply_double_pten(self): input_symbol2gene = {"PTEN": self._pten_gene_double_mutation} rule = AlasccaClassRule("reportgen/assets/ALASCCA_MUTATION_TABLE_SPECIFIC.xlsx", input_symbol2gene) test_report = rule.apply() expected_output_dict = { AlasccaClassReport.ALASCCA_CLASS_FEATURENAME: AlasccaClassReport.MUTN_CLASS_B} self.assertDictEqual(test_report.to_dict(), expected_output_dict)
def test_apply_single_pik3r1_frameshift_off(self): input_symbol2gene = {"PIK3R1": self._pik3r1_gene_frameshift_off} rule = AlasccaClassRule("reportgen/assets/ALASCCA_MUTATION_TABLE_SPECIFIC.xlsx", input_symbol2gene) test_report = rule.apply() # ALASCCA class definitions changed => This is now Class B. expected_output_dict = { AlasccaClassReport.ALASCCA_CLASS_FEATURENAME: AlasccaClassReport.MUTN_CLASS_B} self.assertDictEqual(test_report.to_dict(), expected_output_dict)
def test_apply_single_pten_not_enough(self): input_symbol2gene = {"PTEN": self._pten_gene_single_mutation_not_enough} rule = AlasccaClassRule("reportgen/assets/ALASCCA_MUTATION_TABLE_SPECIFIC.xlsx", input_symbol2gene) test_report = rule.apply() # ALASCCA class definitions changed => This is now Class B. expected_output_dict = { AlasccaClassReport.ALASCCA_CLASS_FEATURENAME: AlasccaClassReport.MUTN_CLASS_B} self.assertDictEqual(test_report.to_dict(), expected_output_dict)
def test_apply_pik3ca_class_a_test2(self): input_symbol2gene = {"PIK3CA": self._pik3ca_gene_missense_a_and_b} rule = AlasccaClassRule( "reportgen/assets/ALASCCA_MUTATION_TABLE_SPECIFIC.xlsx", input_symbol2gene) test_report = rule.apply() expected_output_dict = { AlasccaClassReport.ALASCCA_CLASS_FEATURENAME: AlasccaClassReport.MUTN_CLASS_A } self.assertDictEqual(test_report.to_dict(), expected_output_dict)
def test_apply_single_pik3r1_missense(self): input_symbol2gene = {"PIK3R1": self._pik3r1_gene_missense} rule = AlasccaClassRule( "reportgen/assets/ALASCCA_MUTATION_TABLE_SPECIFIC.xlsx", input_symbol2gene) test_report = rule.apply() expected_output_dict = { AlasccaClassReport.ALASCCA_CLASS_FEATURENAME: AlasccaClassReport.MUTN_CLASS_B } self.assertDictEqual(test_report.to_dict(), expected_output_dict)
def test_apply_double_pten(self): input_symbol2gene = {"PTEN": self._pten_gene_double_mutation} rule = AlasccaClassRule( "reportgen/assets/ALASCCA_MUTATION_TABLE_SPECIFIC.xlsx", input_symbol2gene) test_report = rule.apply() expected_output_dict = { AlasccaClassReport.ALASCCA_CLASS_FEATURENAME: AlasccaClassReport.MUTN_CLASS_B } self.assertDictEqual(test_report.to_dict(), expected_output_dict)
def test_apply_single_pik3r1_frameshift_off(self): input_symbol2gene = {"PIK3R1": self._pik3r1_gene_frameshift_off} rule = AlasccaClassRule( "reportgen/assets/ALASCCA_MUTATION_TABLE_SPECIFIC.xlsx", input_symbol2gene) test_report = rule.apply() # ALASCCA class definitions changed => This is now Class B. expected_output_dict = { AlasccaClassReport.ALASCCA_CLASS_FEATURENAME: AlasccaClassReport.MUTN_CLASS_B } self.assertDictEqual(test_report.to_dict(), expected_output_dict)
def test_apply_single_pten_not_enough(self): input_symbol2gene = { "PTEN": self._pten_gene_single_mutation_not_enough } rule = AlasccaClassRule( "reportgen/assets/ALASCCA_MUTATION_TABLE_SPECIFIC.xlsx", input_symbol2gene) test_report = rule.apply() # ALASCCA class definitions changed => This is now Class B. expected_output_dict = { AlasccaClassReport.ALASCCA_CLASS_FEATURENAME: AlasccaClassReport.MUTN_CLASS_B } self.assertDictEqual(test_report.to_dict(), expected_output_dict)