def check_continuous_chars_against_expected(self, data_filename, expected_filename, datatype): self.logger.info("Checking '%s' => %s" % (data_filename, datatype.__name__)) reader = dataio.get_reader('nexus') dataset = reader.read(stream=pathmap.char_source_stream(data_filename)) expected_label_symbol_stream = pathmap.char_source_stream(expected_filename) self.assertEqual(len(dataset.char_matrices), 1) self.assertEqualCharMatrixLabelContinuousValues(dataset.char_matrices[0], \ expected_label_symbol_stream=expected_label_symbol_stream)
def check_parse_with_ambiguities(self, data_filename, expected_filename): reader = dataio.get_reader('nexus') dataset = reader.read(stream=pathmap.char_source_stream(data_filename)) self.assertEqual(len(dataset.char_matrices), 1) self.map_multistate_to_symbols(dataset.char_matrices[0]) expected_label_symbol_stream = pathmap.char_source_stream(expected_filename) self.assertEqualCharMatrixLabelSymbols(dataset.char_matrices[0], \ expected_label_symbol_stream = expected_label_symbol_stream)
def check_parse_with_ambiguities(self, data_filename, expected_filename): reader = dataio.get_reader('nexus') dataset = reader.read(stream=pathmap.char_source_stream(data_filename)) self.assertEqual(len(dataset.char_matrices), 1) self.map_multistate_to_symbols(dataset.char_matrices[0]) expected_label_symbol_stream = pathmap.char_source_stream( expected_filename) self.assertEqualCharMatrixLabelSymbols(dataset.char_matrices[0], \ expected_label_symbol_stream = expected_label_symbol_stream)
def check_continuous_chars_against_expected(self, data_filename, expected_filename, datatype): self.logger.info("Checking '%s' => %s" % (data_filename, datatype.__name__)) reader = dataio.get_reader('nexus') dataset = reader.read(stream=pathmap.char_source_stream(data_filename)) expected_label_symbol_stream = pathmap.char_source_stream( expected_filename) self.assertEqual(len(dataset.char_matrices), 1) self.assertEqualCharMatrixLabelContinuousValues(dataset.char_matrices[0], \ expected_label_symbol_stream=expected_label_symbol_stream)
def testRoundTripContinuous(self): s = pathmap.char_source_stream("pythonidae_continuous.chars.nexus") d1 = dendropy.DataSet(stream=s, schema="nexus") self.roundTripDataSetTest(d1, "nexus")
def testRoundTripStandard2(self): s = pathmap.char_source_stream("apternodus.chars.nexus") d1 = dendropy.DataSet(stream=s, schema="nexus") self.roundTripDataSetTest(d1, "nexus")
def testRoundTripProtein(self): s = pathmap.char_source_stream("caenophidia_mos.chars.nexus") d1 = dendropy.DataSet(stream=s, schema="nexus") self.roundTripDataSetTest(d1, "nexus")
def testRoundTripStandard2(self): s = pathmap.char_source_stream("apternodus.chars.nexus") d1 = dendropy.DataSet(stream=s, schema="nexus") for ca in d1.char_matrices: ca.markup_as_sequences = False self.roundTripDataSetTest(d1, "nexml", ignore_chartypes=True)
def testRoundTripStandard1(self): s = pathmap.char_source_stream("angiosperms.chars.nexus") d1 = dendropy.DataSet(stream=s, schema="nexus") self.roundTripDataSetTest(d1, "nexml", ignore_chartypes=True)
def testRoundTripStandard2(self): s = pathmap.char_source_stream("apternodus.chars.nexus") d1 = dendropy.DataSet(stream=s, schema="nexus") for ca in d1.char_matrices: ca.markup_as_sequences = False self.roundTripDataSetTest(d1, "nexml")
def testRoundTripStandard1(self): s = pathmap.char_source_stream("angiosperms.chars.nexus") d1 = dendropy.DataSet(stream=s, schema="nexus") self.roundTripDataSetTest(d1, "nexml")
def testRoundTripProtein(self): s = pathmap.char_source_stream("caenophidia_mos.chars.nexus") d1 = dendropy.DataSet(stream=s, schema="nexus") self.roundTripDataSetTest(d1, "nexml")
def setUp(self): s = pathmap.char_source_stream("apternodus.chars.nexml") self.dataset = dendropy.DataSet.get_from_stream(s, "nexml")
def setUp(self): s = pathmap.char_source_stream("pythonidae_continuous.chars.nexml") self.dataset = dendropy.DataSet.get_from_stream(s, "nexml")
def testRoundTripContinuous(self): s = pathmap.char_source_stream("pythonidae_continuous.chars.nexus") d1 = dendropy.DataSet(stream=s, schema="nexus") self.roundTripDataSetTest(d1, "nexus")
def testRoundTripStandard2(self): s = pathmap.char_source_stream("apternodus.chars.nexus") d1 = dendropy.DataSet(stream=s, schema="nexus") self.roundTripDataSetTest(d1, "nexus")