Skip to content

Commit

Permalink
more info on failing gmap_build
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewprzh committed Aug 1, 2023
1 parent 0fa7d8f commit 25d40ad
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions general/UtilsTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,15 @@ def run_gmap(args_reference, genome_len, args_transcripts, args_labels, args_thr
log_out_1=gmap_build_logger_out_path, log_out_2=gmap_build_logger_err_path)
exit_code = subprocess.call(command, shell=True)

logger.info(' logs can be found in {} and {}.'.format(gmap_build_logger_out_path, gmap_build_logger_err_path))
logger.info(' logs can be found in {} and {}'.format(gmap_build_logger_out_path, gmap_build_logger_err_path))

if exit_code != 0:
logger.error(message='{} failed!'.format(gmap_build), exit_with_code=exit_code, to_stderr=True)
gmap_build_logger_err_file = open(gmap_build_logger_err_path, "r")
logger.error(message='{} failed with the following error: '.format(gmap_build))
gmap_build_logger_err_file = open(gmap_build_logger_err_path, "r")
logger.error(gmap_build_logger_err_file.read())
gmap_build_logger_err_file.close()
logger.error(message='{} failed! Check you gmap installation. '.format(gmap_build), exit_with_code=exit_code, to_stderr=True)

end_time = datetime.datetime.now()
spent_time = end_time - start_time
Expand Down Expand Up @@ -590,4 +595,4 @@ def get_genome_bowtie2_index(reference_path, logger, log_dir):
#
# logger.info(' saved to {}'.format(isoforms_fa_path))
#
# return isoforms_fa_path
# return isoforms_fa_path

0 comments on commit 25d40ad

Please sign in to comment.