def verify_dataset(self, ds):
     self.assertEqual(len(ds.taxon_namespaces), 1)
     tns = ds.taxon_namespaces[0]
     checkers = (
         standard_file_test_chars.RnaTestChecker,
         standard_file_test_chars.ProteinTestChecker,
         standard_file_test_chars.Standard01234TestChecker,
         standard_file_test_chars.DnaTestChecker,
     )
     self.assertEqual(len(ds.char_matrices), len(checkers))
     for idx, (char_matrix,
               checker) in enumerate(zip(ds.char_matrices, checkers)):
         self.assertIs(char_matrix.taxon_namespace, tns)
         if checker.matrix_type is dendropy.StandardCharacterMatrix:
             checker.create_class_fixtures_label_sequence_map_based_on_state_alphabet(
                 checker, char_matrix.default_state_alphabet)
         standard_file_test_chars.general_char_matrix_checker(
             self,
             char_matrix,
             checker,
             check_taxon_annotations=self.check_taxon_annotations,
             check_matrix_annotations=self.check_matrix_annotations,
             check_sequence_annotations=self.check_sequence_annotations,
             check_column_annotations=self.check_column_annotations,
             check_cell_annotations=self.check_cell_annotations,
         )
Exemplo n.º 2
0
 def verify_char_matrix(self, char_matrix, src_matrix_checker_type):
     self.assertEqual(type(char_matrix), src_matrix_checker_type.matrix_type)
     if src_matrix_checker_type.matrix_type is dendropy.StandardCharacterMatrix:
         src_matrix_checker_type.create_class_fixtures_label_sequence_map_based_on_state_alphabet(src_matrix_checker_type,
                 char_matrix.default_state_alphabet)
     standard_file_test_chars.general_char_matrix_checker(
             self,
             char_matrix,
             src_matrix_checker_type,
             check_taxon_annotations=self.check_taxon_annotations,
             check_matrix_annotations=self.check_matrix_annotations,
             check_sequence_annotations=self.check_sequence_annotations,
             check_column_annotations=self.check_column_annotations,
             check_cell_annotations=self.check_cell_annotations,)
Exemplo n.º 3
0
 def verify_char_matrix(self, char_matrix, src_matrix_checker_type):
     self.assertEqual(type(char_matrix), src_matrix_checker_type.matrix_type)
     if src_matrix_checker_type.matrix_type is dendropy.StandardCharacterMatrix:
         src_matrix_checker_type.create_class_fixtures_label_sequence_map_based_on_state_alphabet(src_matrix_checker_type,
                 char_matrix.default_state_alphabet)
     standard_file_test_chars.general_char_matrix_checker(
             self,
             char_matrix,
             src_matrix_checker_type,
             check_taxon_annotations=self.check_taxon_annotations,
             check_matrix_annotations=self.check_matrix_annotations,
             check_sequence_annotations=self.check_sequence_annotations,
             check_column_annotations=self.check_column_annotations,
             check_cell_annotations=self.check_cell_annotations,)
 def verify_chars(self, ds):
     self.assertEqual(len(ds.taxon_namespaces), 1)
     tns = ds.taxon_namespaces[0]
     checkers = (
             standard_file_test_chars.RnaTestChecker,
             standard_file_test_chars.ProteinTestChecker,
             standard_file_test_chars.Standard01234TestChecker,
             standard_file_test_chars.DnaTestChecker,
             )
     self.assertEqual(len(ds.char_matrices), len(checkers))
     for idx, (char_matrix, checker) in enumerate(zip(ds.char_matrices, checkers)):
         self.assertIs(char_matrix.taxon_namespace, tns)
         if checker.matrix_type is dendropy.StandardCharacterMatrix:
             checker.create_class_fixtures_label_sequence_map_based_on_state_alphabet(checker,
                     char_matrix.default_state_alphabet)
         standard_file_test_chars.general_char_matrix_checker(
                 self,
                 char_matrix,
                 checker,
                 check_taxon_annotations=self.check_taxon_annotations,
                 check_matrix_annotations=self.check_matrix_annotations,
                 check_sequence_annotations=self.check_sequence_annotations,
                 check_column_annotations=self.check_column_annotations,
                 check_cell_annotations=self.check_cell_annotations,)