Example #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)
Example #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)
Example #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)
Example #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)
Example #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")
Example #6
0
 def testRoundTripStandard2(self):
     s = pathmap.char_source_stream("apternodus.chars.nexus")
     d1 = dendropy.DataSet(stream=s, schema="nexus")
     self.roundTripDataSetTest(d1, "nexus")
Example #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)
Example #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")
Example #11
0
 def testRoundTripStandard1(self):
     s = pathmap.char_source_stream("angiosperms.chars.nexus")
     d1 = dendropy.DataSet(stream=s, schema="nexus")
     self.roundTripDataSetTest(d1, "nexml")
Example #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")
 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")
Example #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")
Example #16
0
 def testRoundTripStandard2(self):
     s = pathmap.char_source_stream("apternodus.chars.nexus")
     d1 = dendropy.DataSet(stream=s, schema="nexus")
     self.roundTripDataSetTest(d1, "nexus")