Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
|
Packages | |
Batch_manager | |
This package provides tools to automate the execution of a given program on a collection of datasets, while varying parameters. Reference Manual – User Manual . Authors: F. Cazals and T. Dreyfus | |
Classes | |
class | BM_Run_specification_tuple |
class | BM_Run_specification_ensemble |
class | BM_Batch |
class | BM_Dataset |
class | BM_Database |
Built-in Methods | |
def | __init__ (self) |
Initialize an empty dataset. More... | |
def | __len__ (self) |
Return the number of files recorded in the dataset. More... | |
Manipulating Data | |
def | get_directory (self) |
Return the directory absolute path. More... | |
def | load_from_directory (self, directory, file_name_re=".*", recursive=False) |
Add all file names in an input directory matching the input regular expression (default is all) with a possible recursive rule (default is False). More... | |
def | remove_data (self, file_name_re=".*") |
Remove all the file names matching the regular expression (default is all). More... | |
def | get_data (self, file_name_re=".*") |
Access to the list of stored file names matching the input regular expression (default is all). More... | |
def | get_tuple_data (self, common_regex, regexs, general_regex=None) |
get_tuple_data More... | |
Built-in Methods | |
def | __init__ (self) |
Initialize an empty database with possibly a name. More... | |
def | __len__ (self) |
Return the number of datasets recorded in the database. More... | |
Manipulating Datasets | |
def | add_dataset (self, dataset) |
Add a dataset to this database. More... | |
def | add_datasets_from_directory (self, directory, file_name_re=".*", recursion_level=0) |
Search recursively in a directory all the files matching the input regular expression, and create one dataset per directory maximally at the input recursion_level. More... | |
def | get_datasets (self) |
Return all the recorded datasets. More... | |
Built-in Methods | |
def | __init__ (self) |
Initialize an empty association rule. More... | |
Building Files Tuples | |
def | build_input_files_tuples (self, IFO_regexs, general_regex, dataset) |
Return the list of tuples of files in the dataset matching the association rules. More... | |
Built-in Methods | |
def | __init__ (self, executable_path="") |
Initialize a run specification with possibly the executable path. More... | |
def | __len__ (self) |
Return the number of options in the specification. More... | |
Executable Path | |
def | get_run_options (self) |
Return the list of nvp options corresponding to this run. More... | |
def | get_executable_path (self) |
Get the executable path. More... | |
def | set_executable_path (self, executable_path) |
Set the executable file path. More... | |
Options Management | |
def | add_option (self, name, value="") |
Add the option name for an input option with a given value. More... | |
def | add_file_option (self, name, value="") |
Add the option name for an input file option with the path to a file. More... | |
def | build_run_command (self) |
Create the command line corresponding to the specified run. More... | |
def | run (self) |
Starts the specified run. More... | |
Built-in Methods | |
def | __len__ (self) |
Return the number of run specifications. More... | |
Runs | |
def | add_run_specification (self, run_specification) |
Add a run specification to the list. More... | |
def | get_lists_of_run_options (self) |
Return the lists of nvp options corresponding to all runs. More... | |
def | get_executable_path (self) |
Get the executable path. More... | |
def | build_run_commands (self) |
Build all the run commands from the list of specifications, and return them as a list. More... | |
def | run (self, output_directory, nb_instances=1) |
Start all the runs in the list. More... | |
Options Management | |
def | add_option_from_nvp_list (self, nvp_list) |
Creates all the possible tuples of options for a run. More... | |
def | build_options_list (self) |
Creates all the possible tuples of options for a run. More... | |
def | get_options_list (self) |
Return the list of possible combinations of NFO. More... | |
Options Management | |
def | add_option_from_nvp_list (self, nvp_list) |
Add a nvp to the options list. More... | |
def | build_options_list (self, dataset, association_rules) |
From the input dataset and association rules, create the tuples of files. More... | |
def | get_options_list (self) |
Return the list of possible combinations of IFO. More... | |
Loading | |
def | set_dataset (self, dataset) |
Set the current dataset from an existing dataset. More... | |
def | add_run_specification (self, run_specification) |
Add a simple run specification to the batch. More... | |
def | load_dataset (self, directory, file_name_re=".*", recursive=False) |
Load the dataset from a directory. More... | |
def | check_specification (self) |
Check that the loaded specification is correct. More... | |
def | load_run_specification (self, file_name) |
Load the specification of the runs from a specification file. More... | |
Building the Runs | |
def | build_run_commands (self) |
Builds the run specifications of each run of the batch, and return them. More... | |
def | split_per_IFO (self) |
Split the batch such that each new batch is invariant w.r.t the IFO. More... | |
def | split_per_NFO (self) |
Split the batch such that each new batch is invariant w.r.t the NFO. More... | |
def | split_per_selected_NFO_option (self, option_name) |
Split the batch such that the new batch is invariant w.r.t the input NFO name. More... | |
def | split_per_selected_IFO_option (self, option_name) |
Split the batch such that the new batch is invariant w.r.t the input IFO name. More... | |
def | split_per_selected_option (self, option_name) |
Split the batch such that the new batch is invariant w.r.t the input option. More... | |
def | split_per_selected_options (self, option_names) |
Same as previous but do it recursively over a list of option names. More... | |
Accessing the Runs | |
def | get_output_directory (self) |
Simple access to the directory where the runs of the batch are run. More... | |
def | set_output_directory_prefix (self, prefix) |
Sets a prefix for the output directory where the runs of the batch are run. More... | |
def | set_output_directory (self, output_directory) |
Sets the output directory, where the runs of the batch are run. More... | |
def | get_run_commands (self) |
Simple access to the run specification of each run. More... | |
Starting the Runs | |
def | print_batch (self) |
Print all the run commands from the list of specifications. More... | |
def | get_lists_of_run_options (self) |
Return a list of run options for each run in the batch. More... | |
def | run (self, nb_instances=1) |
Does the runs nb_instances times. More... | |
def | repeat (self, nb_instances) |
Synonym of run, but the number of instances has no default value. More... | |
def | make_scripts (self) |
Make one file per execution instead of runnning them. More... | |
\class SBL::Batch_manager::BM_Dataset_association_rules \brief Associate a rule between files of a dataset. @} \nosubgrouping
\class SBL::Batch_manager::BM_NFO_set \brief Set of non-file options with multiple values. \details This data structure provides the method get_options_list allowing to return all possible combination of non-file options for a run. @} \nosubgrouping
\class SBL::Batch_manager::BM_IFO_set \brief Set of input file options with multiple values. \details This data structure provides the method get_options_list allowing to return all possible tuples of input files for a run. @} \nosubgrouping