tests package
Submodules
tests.test_core module
This script executes testing of core INDIGOpy functions.
- class tests.test_core.TestClassify[source]
Bases:
object
- classes = ('S', 'N', 'A')
- scores = [-2, 1.5, 0.5, -0.1, 1]
- thresholds = (-1, 1)
- class tests.test_core.TestFeaturize[source]
Bases:
object
- binarize = False
- entropy = True
- feature_names = ['G1', 'G2', 'G3']
- interactions = [['A', 'B'], ['A', 'C'], ['B', 'C'], ['A', 'B', 'C']]
- key = [('A', 'Drug_A'), ('B', 'Drug_B'), ('C', 'Drug_C')]
- na_handle = 0
- norm_method = 'minmax'
- normalize = True
- orthology_map = {'IAI1': ['G1'], 'MC1400': ['G1', 'G3'], 'MG1655': ['G1', 'G2']}
- profiles = {'A': [1, nan, 1], 'B': [-2, 1.5, -0.5], 'C': [1, 2, 3]}
- profiles_alt = {'Drug_A': [1, nan, 1], 'Drug_B': [-2, 1.5, -0.5], 'Drug_C': [1, 2, 3]}
- remove_zero_rows = True
- silent = False
- strains = ['MG1655', 'MG1655', 'MC1400', 'IAI1']
- test_featurize_feature_names()[source]
Make sure that featurize works with the feature_names parameter.
- test_featurize_key_and_silent()[source]
Make sure that featurize works with the key parameter provided mismatching interactions and profiles. Also check that a warning is raised.
- test_featurize_normalize_and_norm_method()[source]
Make sure that featurize works with normalize and norm_method parameters.
- test_featurize_remove_zero_rows()[source]
Make sure that featurize works with the remove_zero_rows parameter.
- test_featurize_strains_and_orthology_map()[source]
Make sure that featurize works with strains and orthology_map parameters.
- test_featurize_time_and_time_values()[source]
Make sure that featurize works with time and time_values parameters.
- thresholds = (-1, 1)
- time = True
- time_values = [[0, 0], [1, 1], [1, 2], [1, 2, 3]]