Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
 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)
Ejemplo n.º 3
0
 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)
Ejemplo n.º 4
0
 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)
Ejemplo n.º 5
0
 def testRoundTripContinuous(self):
     s = pathmap.char_source_stream("pythonidae_continuous.chars.nexus")
     d1 = dendropy.DataSet(stream=s, schema="nexus")
     self.roundTripDataSetTest(d1, "nexus")
Ejemplo n.º 6
0
 def testRoundTripStandard2(self):
     s = pathmap.char_source_stream("apternodus.chars.nexus")
     d1 = dendropy.DataSet(stream=s, schema="nexus")
     self.roundTripDataSetTest(d1, "nexus")
Ejemplo n.º 7
0
 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)
Ejemplo n.º 10
0
 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")
Ejemplo n.º 11
0
 def testRoundTripStandard1(self):
     s = pathmap.char_source_stream("angiosperms.chars.nexus")
     d1 = dendropy.DataSet(stream=s, schema="nexus")
     self.roundTripDataSetTest(d1, "nexml")
Ejemplo n.º 12
0
 def testRoundTripProtein(self):
     s = pathmap.char_source_stream("caenophidia_mos.chars.nexus")
     d1 = dendropy.DataSet(stream=s, schema="nexus")
     self.roundTripDataSetTest(d1, "nexml")
Ejemplo n.º 13
0
 def setUp(self):
     s = pathmap.char_source_stream("apternodus.chars.nexml")
     self.dataset = dendropy.DataSet.get_from_stream(s, "nexml")
Ejemplo n.º 14
0
 def setUp(self):
     s = pathmap.char_source_stream("pythonidae_continuous.chars.nexml")
     self.dataset = dendropy.DataSet.get_from_stream(s, "nexml")
Ejemplo n.º 15
0
 def testRoundTripContinuous(self):
     s = pathmap.char_source_stream("pythonidae_continuous.chars.nexus")
     d1 = dendropy.DataSet(stream=s, schema="nexus")
     self.roundTripDataSetTest(d1, "nexus")
Ejemplo n.º 16
0
 def testRoundTripStandard2(self):
     s = pathmap.char_source_stream("apternodus.chars.nexus")
     d1 = dendropy.DataSet(stream=s, schema="nexus")
     self.roundTripDataSetTest(d1, "nexus")