drive.helper_funcs package#

Submodules#

drive.helper_funcs.generate_random_filename module#

drive.helper_funcs.generate_random_filename.generate_random_logfile_suffix(log_filename: str) str[source]#

add a unique suffix to the end of the log filename if the log file already exist. This will prevent weird writing race conditions when multiple RIVE jobs are run in slurm using the default log filename

Parameters:

log_filename (str) – name of the log file (without the parent directory) that was passed by the user or the default value of DRIVE.log

Returns:

returns the new log filename with the suffix added

Return type:

str

drive.helper_funcs.split_region_str module#

drive.helper_funcs.split_region_str.split_target_string(chromo_pos_str: str) Genes[source]#

Function that will split the target string provided by the user.

Parameters:

chromo_pos_str (str) – String that has the region of interest in base pairs. This string will look like 10:1234-1234 where the first number is the chromosome number, then the start position, and then the end position of the region of interest.

Returns:

returns a namedtuple that has the chromosome number, the start position, and the end position

Return type:

Genes

Raises:

ValueError – raises a value error if the string was formatted any other way than chromosome:start_position-end_position. Also raises a value error if the start position is larger than the end position

Module contents#