def testSimpleCopyStandardMatrix(self): char_matrix = datagen.reference_standard_matrix() ds1 = dendropy.DataSet(char_matrix) self.assertEqual(len(ds1.char_matrices), 1) self.assertIs(ds1.char_matrices[0], char_matrix) ds2 = dendropy.DataSet(ds1) self.assertDistinctButEqual(ds1, ds2, ignore_chartypes=True)
def testSimpleCopyStandardMatrix(self): char_matrix = datagen.reference_standard_matrix() ds1 = dendropy.DataSet(char_matrix) self.assertEqual(len(ds1.char_matrices), 1) self.assertIs(ds1.char_matrices[0], char_matrix) ds2 = dendropy.DataSet(ds1) self.assertDistinctButEqual(ds1, ds2)
def testStandardRountTripSameTaxa(self): c1 = datagen.reference_standard_matrix() path = pathmap.named_output_path("char_rw_dna.nex") c1.write_to_path(path, "nexus") c2 = dendropy.StandardCharacterMatrix.get_from_path( path, "nexus", taxon_set=c1.taxon_set) self.assertDistinctButEqual(c1, c2, char_type=dendropy.StandardCharacterMatrix, distinct_state_alphabets=None, distinct_taxa=False)
def testStandardRountTripSameTaxa(self): c1 = datagen.reference_standard_matrix() path = pathmap.named_output_path("char_rw_dna.nex") c1.write_to_path(path, "nexus") c2 = dendropy.StandardCharacterMatrix.get_from_path(path, "nexus", taxon_set=c1.taxon_set) self.assertDistinctButEqual( c1, c2, char_type=dendropy.StandardCharacterMatrix, distinct_state_alphabets=None, distinct_taxa=False)
def testStandardRountTripDistinctTaxa(self): c1 = datagen.reference_standard_matrix() path = pathmap.named_output_path("char_rw_dna.nex") c1.write_to_path(path, "nexus") c2 = dendropy.StandardCharacterMatrix.get_from_stream( open(path, "rU"), "nexus") self.assertDistinctButEqual(c1, c2, char_type=dendropy.StandardCharacterMatrix, distinct_state_alphabets=None, distinct_taxa=True, ignore_chartypes=True)
def testStandardRountTripDistinctTaxa(self): c1 = datagen.reference_standard_matrix() path = pathmap.named_output_path("char_rw_dna.nex") c1.write_to_path(path, "nexus") c2 = dendropy.StandardCharacterMatrix.get_from_stream(open(path, "rU"), "nexus") self.assertDistinctButEqual( c1, c2, char_type=dendropy.StandardCharacterMatrix, distinct_state_alphabets=None, distinct_taxa=True, ignore_chartypes=True)
def setUp(self): self.char_matrix1 = datagen.reference_standard_matrix()
def setUp(self): self.trees = datagen.reference_tree_list() self.dna_chars = datagen.reference_dna_matrix() self.std_chars = datagen.reference_standard_matrix()
def setUp(self): self.trees = datagen.reference_tree_list() self.dna_chars = datagen.reference_dna_matrix() self.std_chars = datagen.reference_standard_matrix()
def setUp(self): self.char_matrix1 = datagen.reference_standard_matrix()
def setUp(self): self.taxon_set = datagen.reference_taxon_set() self.dna_matrix = datagen.reference_dna_matrix(self.taxon_set) self.std_matrix = datagen.reference_standard_matrix(self.taxon_set) self.cont_matrix = datagen.reference_continuous_matrix(self.taxon_set)
def setUp(self): self.taxon_set = datagen.reference_taxon_set() self.dna_matrix = datagen.reference_dna_matrix(self.taxon_set) self.std_matrix = datagen.reference_standard_matrix(self.taxon_set) self.cont_matrix = datagen.reference_continuous_matrix( self.taxon_set)