Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
deepakunni3 committed Aug 7, 2020
1 parent 24ceaa0 commit 0465a41
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
9 changes: 5 additions & 4 deletions tests/test_drug_central.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ def test_edges_file(self):
edge_file = os.path.join(self.dc_output_dir, "edges.tsv")
self.assertTrue(os.path.isfile(edge_file))
edge_df = pd.read_csv(edge_file, sep="\t", header=0)
self.assertEqual((21, 6), edge_df.shape)
self.assertEqual(['subject', 'edge_label', 'object', 'relation', 'provided_by',
'comment'],
list(edge_df.columns))
self.assertEqual((21, 7), edge_df.shape)
self.assertEqual(
['subject', 'edge_label', 'object', 'relation', 'provided_by', 'comment', 'type'],
list(edge_df.columns)
)
5 changes: 3 additions & 2 deletions tests/test_intact.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def test_intact_instance(self):
self.assertEqual(self.intact.node_header,
['id', 'name', 'category', 'ncbi_taxid', 'provided_by'])
self.assertEqual(self.intact.edge_header,
['subject', 'edge_label', 'object', 'relation', 'provided_by',
['subject', 'edge_label', 'object', 'relation', 'provided_by', 'type',
'publication', 'num_participants', 'association_type',
'detection_method', 'subj_exp_role', 'obj_exp_role'])

Expand All @@ -35,7 +35,7 @@ def test_struct_parse_xml_to_nodes_edges(self):
['UniProtKB:P0C6X7-PRO_0000037317', 'nsp10_cvhsa', 'biolink:RNA',
'694009', 'intact']],
'edges': [['UniProtKB:P20290', 'biolink:interacts_with',
'UniProtKB:P0C6X7-PRO_0000037317', 'RO:0002437', 'intact',
'UniProtKB:P0C6X7-PRO_0000037317', 'RO:0002437', 'intact', 'biolink:Association',
'PMID:16157265', '2', 'physical association', '2 hybrid', 'prey',
'bait']]
}),
Expand All @@ -47,6 +47,7 @@ def test_struct_parse_xml_to_nodes_edges(self):
'UniProtKB:P41811',
'RO:0002437',
'intact',
'biolink:Association',
'PMID:23481256',
'3',
'physical association',
Expand Down
2 changes: 1 addition & 1 deletion tests/test_sars_cov_2_gene_annot.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def test_gpa_to_edge_data(self):
self.assertEqual(len(self.sc2ga.edge_header), len(edge1))
self.assertEqual(edge1,
['UniProtKB:P0DTC1', 'biolink:enables', 'GO:0003723',
'RO:0002327', 'sars_cov_2_gene_annot',
'RO:0002327', 'sars_cov_2_gene_annot', 'biolink:Association',
'GO_REF:0000043', 'ECO:0000322', 'UniProtKB-KW:KW-0694', '',
'20200321', 'UniProt', '', 'go_evidence=IEA'])

Expand Down
4 changes: 2 additions & 2 deletions tests/test_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ def test_edges_file(self):
edge_file = os.path.join(self.string_output_dir, "edges.tsv")
self.assertTrue(os.path.isfile(edge_file))
edge_df = pd.read_csv(edge_file, sep="\t", header=0)
self.assertEqual((9, 19), edge_df.shape)
self.assertEqual(['subject', 'edge_label', 'object', 'relation', 'provided_by',
self.assertEqual((9, 20), edge_df.shape)
self.assertEqual(['subject', 'edge_label', 'object', 'relation', 'provided_by', 'type',
'combined_score', 'neighborhood', 'neighborhood_transferred',
'fusion', 'cooccurence', 'homology', 'coexpression',
'coexpression_transferred', 'experiments',
Expand Down

0 comments on commit 0465a41

Please sign in to comment.