Example #1
0
 def test_export_df_inode(self):
     """Test exporting dataframes with inode-based nomenclature in the second layer."""
     ppi_df, tf_df = to_npa_dfs(
         self.graph,
         nomenclature_method_first_layer='name',
         nomenclature_method_second_layer='inodes',
     )
     self.assertEqual(('2', '3', 1), tuple(list(ppi_df.values)[0]))
     self.assertEqual(('*1', '*2', 1), tuple(list(tf_df.values)[0]))
Example #2
0
 def test_export_df_curie(self):
     """Test exporting dataframes with curie-based nomenclature."""
     ppi_df, tf_df = to_npa_dfs(self.graph)
     self.assertIsInstance(ppi_df, pd.DataFrame)
     self.assertIsInstance(tf_df, pd.DataFrame)
     self.assertEqual(1, len(ppi_df.index))
     self.assertEqual(1, len(tf_df.index))
     self.assertEqual(('hgnc:2', 'hgnc:3', 1), tuple(list(ppi_df.values)[0]))
     self.assertEqual(('hgnc:1', 'hgnc:2', 1), tuple(list(tf_df.values)[0]))