chemicalchecker.tool.targetmate.signaturizer.Signaturizer
- class Signaturizer(datasets=None, sign_predict_paths=None, **kwargs)[source]
Bases:
BaseSignaturizer
Set up a Signaturizer
Set up a Signaturizer
- Parameters:
datasets (list) – CC datasets (A1.001-E5.999). By default, all datasets having a SMILES-to-sign predictor are used.
sign_predict_paths (dict) – pre-loaded predict_fn, keys are dataset codes, values are tuples of (sign, predict_fn)
Methods
Store model in compressed format for persistance
cpu_count
create_models_path
directory_tree
Execute the any method on the configured HPC.
get_datasets
get_destination_dir
get_master_idxs
Load previously stored TargetMate instance.
Load a base model
load_data
Check master key types
master_mapping
read_data
read_signatures
Return signatures as an ensemble
Return signatures in a stacked form from an already prestacked file
Return signatures in a stacked form
Redefine path of a TargetMate instance.
Redefine path of a TargetMate instance.
repath_predictions_by_fold_and_set
Redefine path of a TargetMate instance.
reset_path_bases
Reset predictions path
Save TargetMate instance
save_data
signaturize
Wait for jobs to finish
Delete temporary data
- compress_models()
Store model in compressed format for persistance
- func_hpc(func_name, *args, **kwargs)
Execute the any method on the configured HPC.
- Parameters:
args (tuple) – the arguments for of the function method
kwargs (dict) – arguments for the HPC method.
- static load(models_path)
Load previously stored TargetMate instance.
- load_base_model(destination_dir, append_pipe=False)
Load a base model
- master_key_type()
Check master key types
- read_signatures_ensemble(datasets, smiles, inchikeys, idxs, is_tmp, sign_folder)[source]
Return signatures as an ensemble
- read_signatures_prestacked(mask, datasets, smiles, inchikeys, idxs, is_tmp, sign_folder)[source]
Return signatures in a stacked form from an already prestacked file
- read_signatures_stacked(datasets, smiles, inchikeys, idxs, is_tmp, sign_folder)[source]
Return signatures in a stacked form
- repath_bases_by_fold(fold_number, is_tmp=True, reset=True, only_train=False)
Redefine path of a TargetMate instance. Used by the Validation class.
- repath_predictions_by_fold(fold_number, is_tmp=True, reset=True)
Redefine path of a TargetMate instance. Used by the Validation class.
- repath_predictions_by_set(is_train, is_tmp=True, reset=True)
Redefine path of a TargetMate instance. Used by the Validation class.
- reset_path_predictions(is_tmp=True)
Reset predictions path
- save()
Save TargetMate instance
- waiter(jobs, secs=3)
Wait for jobs to finish
- wipe()
Delete temporary data