From 9e8c9802a2f6ac9cb686099f3c8bb55a58d7d96d Mon Sep 17 00:00:00 2001 From: Li Date: Thu, 25 Jan 2024 21:25:27 -0500 Subject: [PATCH] Add some debug information when reading the temporary file --- chromap.1 | 2 +- src/chromap.h | 2 +- src/temp_mapping.h | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/chromap.1 b/chromap.1 index 0b1a205..3755edf 100644 --- a/chromap.1 +++ b/chromap.1 @@ -1,4 +1,4 @@ -.TH chromap 1 "25 Jan 2024" "chromap-0.2.6 (r489)" "Bioinformatics tools" +.TH chromap 1 "25 Jan 2024" "chromap-0.2.6 (r490)" "Bioinformatics tools" .SH NAME .PP chromap - fast alignment and preprocessing of chromatin profiles diff --git a/src/chromap.h b/src/chromap.h index 7cc6085..bebddd6 100644 --- a/src/chromap.h +++ b/src/chromap.h @@ -29,7 +29,7 @@ #include "temp_mapping.h" #include "utils.h" -#define CHROMAP_VERSION "0.2.6-r489" +#define CHROMAP_VERSION "0.2.6-r490" namespace chromap { diff --git a/src/temp_mapping.h b/src/temp_mapping.h index bd75a62..a059146 100644 --- a/src/temp_mapping.h +++ b/src/temp_mapping.h @@ -39,6 +39,9 @@ struct TempMappingFileHandle { inline void InitializeTempMappingLoading(uint32_t temp_mapping_block_size) { file = fopen(file_path.c_str(), "rb"); + if (file == NULL) { + std::cerr << "Temporary file " << file_path << " is missing.\n" ; + } assert(file != NULL); num_mappings = 0; block_size = temp_mapping_block_size;