Esempio n. 1
0
 def test_plot_custom_axes(self):
     with tempfile.TemporaryDirectory() as output_dir:
         plot(output_dir, self.pcoa, self.metadata,
              custom_axes=['val1', 'val2'])
         index_fp = os.path.join(output_dir, 'index.html')
         self.assertTrue(os.path.exists(index_fp))
         self.assertTrue('src="./emperor.html"' in open(index_fp).read())
Esempio n. 2
0
 def test_plot_with_pcoa_features_strategy_error(self):
     # using the biplot test data, since it has features
     with tempfile.TemporaryDirectory() as output_dir, \
             self.assertRaisesRegex(ValueError,
                                    'Arrows cannot be visualized'):
         plot(output_dir, self.biplot, self.metadata,
              ignore_pcoa_features=False)
Esempio n. 3
0
 def test_plot_custom_axes(self):
     with tempfile.TemporaryDirectory() as output_dir:
         plot(output_dir, self.pcoa, self.metadata,
              custom_axes=['val1', 'val2'])
         index_fp = os.path.join(output_dir, 'index.html')
         self.assertTrue(os.path.exists(index_fp))
         self.assertTrue('src="./emperor.html"' in open(index_fp).read())
Esempio n. 4
0
 def test_plot_with_pcoa_features_strategy_ignore(self):
     # using the biplot test data, since it has features
     with tempfile.TemporaryDirectory() as output_dir:
         plot(output_dir, self.biplot, self.metadata,
              ignore_pcoa_features=True)
         self.assertTrue(True)  # checkpoint, everything should be good