tests package¶
Submodules¶
tests.test_chembl module¶
-
class
tests.test_chembl.
TestChembl
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Tests the ChEMBL transform
-
setUp
() → None¶ Hook method for setting up the test fixture before exercising it.
-
classmethod
setUpClass
() → None¶ Hook method for setting up class fixture before running tests in the class.
-
test_parse_chembl_activity
()¶
-
test_run
() → None¶
-
test_source_name
() → None¶
-
tests.test_download module¶
tests.test_download_from_yaml module¶
-
class
tests.test_download_from_yaml.
TestDownloadFromYaml
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Tests download_yaml()
tests.test_drug_central module¶
-
class
tests.test_drug_central.
TestDrugCentral
(methodName='runTest')¶ Bases:
unittest.case.TestCase
-
setUp
() → None¶ Hook method for setting up the test fixture before exercising it.
-
test_edges_file
()¶
-
test_nodes_are_not_repeated
()¶
-
test_nodes_file
()¶
-
test_parse_drug_central_line
= None¶
-
test_parse_drug_central_line_00_STRUCT_ID
()¶
-
test_parse_drug_central_line_01_TARGET_NAME
()¶
-
test_parse_drug_central_line_02_TARGET_CLASS
()¶
-
test_parse_drug_central_line_03_ACCESSION
()¶
-
test_parse_drug_central_line_04_GENE
()¶
-
test_parse_drug_central_line_05_SWISSPROT
()¶
-
test_parse_drug_central_line_06_ACT_VALUE
()¶
-
test_parse_drug_central_line_07_ACT_UNIT
()¶
-
test_parse_drug_central_line_08_ACT_TYPE
()¶
-
test_parse_drug_central_line_09_ACT_COMMENT
()¶
-
test_parse_drug_central_line_10_ACT_SOURCE
()¶
-
test_parse_drug_central_line_11_RELATION
()¶
-
test_parse_drug_central_line_12_MOA
()¶
-
test_parse_drug_central_line_13_MOA_SOURCE
()¶
-
test_parse_drug_central_line_14_ACT_SOURCE_URL
()¶
-
test_parse_drug_central_line_15_MOA_SOURCE_URL
()¶
-
test_parse_drug_central_line_16_ACTION_TYPE
()¶
-
test_parse_drug_central_line_17_TDL
()¶
-
test_parse_drug_central_line_18_ORGANISM
()¶
-
test_run
()¶
-
tests.test_gocams module¶
tests.test_gpi_file module¶
tests.test_holdouts module¶
-
class
tests.test_holdouts.
TestEdges
(methodName='runTest')¶ Bases:
unittest.case.TestCase
-
setUp
() → None¶ Hook method for setting up the test fixture before exercising it.
-
classmethod
setUpClass
() → None¶ Hook method for setting up class fixture before running tests in the class.
-
test_df_to_tsv
()¶
-
test_make_edges_check_edge_output_files
= None¶
-
test_make_edges_check_edge_output_files_0_pos_train_edges_tsv
()¶
-
test_make_edges_check_edge_output_files_1_pos_test_edges_tsv
()¶
-
test_make_edges_check_edge_output_files_2_pos_test_edges_tsv
()¶
-
test_make_edges_check_edge_output_files_3_pos_valid_edges_tsv
()¶
-
test_make_edges_check_edge_output_files_4_pos_valid_edges_tsv
()¶
-
test_make_edges_check_edge_output_files_5_neg_train_edges_tsv
()¶
-
test_make_edges_check_edge_output_files_6_neg_test_edges_tsv
()¶
-
test_make_edges_check_edge_output_files_7_neg_test_edges_tsv
()¶
-
test_make_edges_check_edge_output_files_8_neg_valid_edges_tsv
()¶
-
test_make_edges_check_edge_output_files_9_neg_valid_edges_tsv
()¶
-
test_make_edges_check_node_output_file
()¶
-
test_make_edges_exists
()¶
-
test_make_edges_pos_train_test_valid_edges_distinct
= None¶
-
test_make_edges_pos_train_test_valid_edges_distinct_0_pos_train_edges_tsv
()¶
-
test_make_edges_pos_train_test_valid_edges_distinct_1_neg_train_edges_tsv
()¶
-
test_make_negative_edges_check_column_names
()¶
-
test_make_negative_edges_check_edge_label_column
()¶
-
test_make_negative_edges_check_instance_type
()¶
-
test_make_negative_edges_check_neg_nodes
()¶
-
test_make_negative_edges_check_num_edges_returned
()¶
-
test_make_negative_edges_check_relation_column
()¶
-
test_make_negative_edges_ensure_neg_edges_are_actually_negative
()¶
-
test_make_negative_edges_no_reflexive_edges
()¶
-
test_make_negative_edges_test_repeated_edges
()¶
-
test_make_positive_edges_check_nodes
()¶
-
test_make_positive_edges_check_num_test_edges_returned
()¶
-
test_make_positive_edges_check_num_train_edges_returned
()¶
-
test_make_positive_edges_check_test_edge_label_column
()¶
-
test_make_positive_edges_check_test_edge_relation_column
()¶
-
test_make_positive_edges_check_test_edges_column_names
()¶
-
test_make_positive_edges_check_train_edges_column_num
()¶
-
test_make_positive_edges_check_train_edges_columns
()¶
-
test_make_positive_edges_test_pos_edges_are_in_input_edge_df
()¶
-
test_make_positive_edges_test_pos_edges_are_removed_from_train_edges
()¶
-
test_make_positive_edges_test_repeated_edges
()¶
-
test_make_positives_edges_check_new_edges_instance_type
()¶
-
test_make_positives_edges_check_test_edge_instance_type
()¶
-
test_tsv_to_df
()¶
-
tests.test_intact module¶
-
class
tests.test_intact.
TestIntAct
(methodName='runTest')¶ Bases:
unittest.case.TestCase
-
setUp
() → None¶ Hook method for setting up the test fixture before exercising it.
-
test_fix_for_chebi_id
()¶
-
test_intact_instance
()¶
-
test_nodes_parse_xml_to_nodes_edges
= None¶
-
test_nodes_parse_xml_to_nodes_edges_0_tests_resources_intact_test_xml
()¶
-
test_nodes_parse_xml_to_nodes_edges_1_tests_resources_intact_3_participants_xml
()¶
-
test_parse_experiment_info
= None¶
-
test_parse_experiment_info_0_tests_resources_intact_test_xml
()¶
-
test_parse_experiment_info_1_tests_resources_intact_test_xml
()¶
-
test_struct_parse_xml_to_nodes_edges
()¶
-
tests.test_pharmgkb module¶
-
class
tests.test_pharmgkb.
TestPharmGKB
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Tests the ttd transform
-
setUp
() → None¶ Hook method for setting up the test fixture before exercising it.
-
test_make_id_mapping_file
() → None¶
-
test_make_preferred_drug_id
= None¶
-
test_make_preferred_drug_id_0_PA164712302
() → None¶
-
test_make_preferred_drug_id_1_PA131887008
() → None¶
-
test_parse_pharmgkb_line
() → None¶
-
test_run
() → None¶
-
tests.test_query module¶
-
class
tests.test_query.
TestQuery
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Tests query functions()
-
setUp
() → None¶ Hook method for setting up the test fixture before exercising it.
-
test_parse_query_rq
() → None¶
-
test_parse_query_rq_parameterized
= None¶
-
test_parse_query_rq_parameterized_0_title
() → None¶
-
test_parse_query_rq_parameterized_1_description
() → None¶
-
test_parse_query_rq_parameterized_2_endpoint
() → None¶
-
test_parse_query_rq_parameterized_3_query
() → None¶
-
test_parse_query_rq_should_return_dict
() → None¶
-
test_result_dict_to_tsv_makes_correct_file
()¶
-
test_result_dict_to_tsv_makes_file
()¶
-
-
tests.test_query.
load_obj
(name)¶
-
tests.test_query.
save_obj
(obj, name)¶
tests.test_run module¶
tests.test_sars_cov_2_gene_annot module¶
-
class
tests.test_sars_cov_2_gene_annot.
TestSarsGeneAnnot
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Tests the SARS-CoV-2 gene annotation transform
-
setUp
() → None¶ Hook method for setting up the test fixture before exercising it.
-
test_gpa_to_edge_data
()¶
-
test_gpi12iterator_instance
= None¶
-
test_gpi12iterator_instance_0_DB
()¶
-
test_gpi12iterator_instance_1_DB_Object_ID
()¶
-
test_gpi12iterator_instance_2_DB_Object_Symbol
()¶
-
test_gpi12iterator_instance_3_DB_Object_Name
()¶
-
test_gpi12iterator_instance_4_DB_Object_Synonym
()¶
-
test_gpi12iterator_instance_5_DB_Object_Type
()¶
-
test_gpi12iterator_instance_6_DB_Xref
()¶
-
test_gpi12iterator_instance_7_Taxon
()¶
-
test_gpi_to_gene_node
()¶
-
test_run
() → None¶
-
tests.test_scibite_cord module¶
tests.test_string module¶
-
class
tests.test_string.
TestString
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Tests the string ingest
-
setUp
() → None¶ Hook method for setting up the test fixture before exercising it.
-
test_edges_file
()¶
-
test_input_dir
()¶
-
test_instance_vars
= None¶
-
test_instance_vars_0_ensembl2ncbi_map
()¶
-
test_instance_vars_1_gene_info_map
()¶
-
test_instance_vars_2_protein_gene_map
()¶
-
test_nodes_file
()¶
-
test_output_dir
()¶
-
test_output_edge_file
()¶
-
test_output_node_file
()¶
-
test_run
()¶
-
test_source_name
()¶
-
tests.test_transform_class module¶
-
class
tests.test_transform_class.
TestTransform
(methodName='runTest')¶ Bases:
unittest.case.TestCase
-
setUp
() → None¶ Hook method for setting up the test fixture before exercising it.
-
test_attributes
= None¶
-
test_attributes_0_source_name
()¶
-
test_attributes_1_node_header
()¶
-
test_attributes_2_edge_header
()¶
-
test_attributes_3_output_base_dir
()¶
-
test_attributes_4_input_base_dir
()¶
-
test_attributes_5_output_dir
()¶
-
test_attributes_6_output_node_file
()¶
-
test_attributes_7_output_edge_file
()¶
-
test_attributes_8_output_json_file
()¶
-
test_default_dir
= None¶
-
test_default_dir_0_DEFAULT_INPUT_DIR
()¶
-
test_default_dir_1_DEFAULT_OUTPUT_DIR
()¶
-
test_reality
()¶
-
test_transform_child_classes
= None¶
-
test_transform_child_classes_00_ZhouTransform
()¶ Make sure Transform child classes: [with src_name=’ZhouTransform’] - properly set default input_dir and output_dir - properly pass and set input_dir and output from constructor - implement run()
- Parameters
src_name –
- Returns
None
-
test_transform_child_classes_01_DrugCentralTransform
()¶ Make sure Transform child classes: [with src_name=’DrugCentralTransform’] - properly set default input_dir and output_dir - properly pass and set input_dir and output from constructor - implement run()
- Parameters
src_name –
- Returns
None
-
test_transform_child_classes_02_TTDTransform
()¶ Make sure Transform child classes: [with src_name=’TTDTransform’] - properly set default input_dir and output_dir - properly pass and set input_dir and output from constructor - implement run()
- Parameters
src_name –
- Returns
None
-
test_transform_child_classes_03_StringTransform
()¶ Make sure Transform child classes: [with src_name=’StringTransform’] - properly set default input_dir and output_dir - properly pass and set input_dir and output from constructor - implement run()
- Parameters
src_name –
- Returns
None
-
test_transform_child_classes_04_ScibiteCordTransform
()¶ Make sure Transform child classes: [with src_name=’ScibiteCordTransform’] - properly set default input_dir and output_dir - properly pass and set input_dir and output from constructor - implement run()
- Parameters
src_name –
- Returns
None
-
test_transform_child_classes_05_PharmGKB
()¶ Make sure Transform child classes: [with src_name=’PharmGKB’] - properly set default input_dir and output_dir - properly pass and set input_dir and output from constructor - implement run()
- Parameters
src_name –
- Returns
None
-
test_transform_child_classes_06_SARSCoV2GeneAnnot
()¶ Make sure Transform child classes: [with src_name=’SARSCoV2GeneAnnot’] - properly set default input_dir and output_dir - properly pass and set input_dir and output from constructor - implement run()
- Parameters
src_name –
- Returns
None
-
test_transform_child_classes_07_IntAct
()¶ Make sure Transform child classes: [with src_name=’IntAct’] - properly set default input_dir and output_dir - properly pass and set input_dir and output from constructor - implement run()
- Parameters
src_name –
- Returns
None
-
test_transform_child_classes_08_GoTransform
()¶ Make sure Transform child classes: [with src_name=’GoTransform’] - properly set default input_dir and output_dir - properly pass and set input_dir and output from constructor - implement run()
- Parameters
src_name –
- Returns
None
-
test_transform_child_classes_09_HpTransform
()¶ Make sure Transform child classes: [with src_name=’HpTransform’] - properly set default input_dir and output_dir - properly pass and set input_dir and output from constructor - implement run()
- Parameters
src_name –
- Returns
None
-
test_transform_child_classes_10_MondoTransform
()¶ Make sure Transform child classes: [with src_name=’MondoTransform’] - properly set default input_dir and output_dir - properly pass and set input_dir and output from constructor - implement run()
- Parameters
src_name –
- Returns
None
-
test_transform_child_classes_11_ChebiTransform
()¶ Make sure Transform child classes: [with src_name=’ChebiTransform’] - properly set default input_dir and output_dir - properly pass and set input_dir and output from constructor - implement run()
- Parameters
src_name –
- Returns
None
-
test_transform_child_classes_12_GocamTransform
()¶ Make sure Transform child classes: [with src_name=’GocamTransform’] - properly set default input_dir and output_dir - properly pass and set input_dir and output from constructor - implement run()
- Parameters
src_name –
- Returns
None
-
test_transform_child_classes_13_ChemblTransform
()¶ Make sure Transform child classes: [with src_name=’ChemblTransform’] - properly set default input_dir and output_dir - properly pass and set input_dir and output from constructor - implement run()
- Parameters
src_name –
- Returns
None
-
-
class
tests.test_transform_class.
TransformChildClass
¶
tests.test_transform_utils module¶
-
class
tests.test_transform_utils.
TestTransformUtils
(methodName='runTest')¶ Bases:
unittest.case.TestCase
-
test_collapse_uniprot_curie
= None¶
-
test_collapse_uniprot_curie_0_foobar
()¶
-
test_collapse_uniprot_curie_1_ENSEMBL_ENSG00000178607
()¶
-
test_collapse_uniprot_curie_2_UniprotKB_P63151_1
()¶
-
test_collapse_uniprot_curie_3_uniprotkb_P63151_1
()¶
-
test_collapse_uniprot_curie_4_UniprotKB_P63151_2
()¶
-
test_guess_bl_category
= None¶
-
test_guess_bl_category_0_
()¶
-
test_guess_bl_category_1_UniProtKB
()¶
-
test_guess_bl_category_2_ComplexPortal
()¶
-
test_guess_bl_category_3_GO
()¶
-
tests.test_ttd_transform module¶
-
class
tests.test_ttd_transform.
TestTTD
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Tests the ttd transform
-
setUp
() → None¶ Hook method for setting up the test fixture before exercising it.
-
test_parse_ttd_file_fxn
() → None¶
-
test_parse_ttd_file_values
= None¶
-
test_parse_ttd_file_values_0_T47101
()¶
-
test_parse_ttd_file_values_1_T47101
()¶
-
test_parse_ttd_file_values_2_T47101
()¶
-
test_parse_ttd_file_values_3_T17514
()¶
-
test_run
() → None¶
-