Skip to content

Commit c918f88

Browse files
committed
Small changes to reference fetching logic
1 parent 5e12dcd commit c918f88

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ cram_os_h = cram/os.h $(htslib_hts_endian_h)
175175
cram_sam_header_h = cram/sam_header.h cram/string_alloc.h cram/pooled_alloc.h $(htslib_khash_h) $(htslib_kstring_h)
176176
cram_samtools_h = cram/cram_samtools.h $(htslib_sam_h) $(cram_sam_header_h)
177177
cram_structs_h = cram/cram_structs.h $(htslib_thread_pool_h) cram/string_alloc.h $(htslib_khash_h)
178-
cram_op]en_trace_file_h = cram/open_trace_file.h cram/mFILE.h
179178

180179
hfile_internal_h = hfile_internal.h $(htslib_hfile_h) $(textutils_internal_h)
181180
hts_internal_h = hts_internal.h $(htslib_hts_h) $(textutils_internal_h)

cram/cram_io.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1924,8 +1924,9 @@ static int cram_populate_ref(cram_fd *fd, int id, ref_entry *r) {
19241924
int no_m5 = 0;
19251925
char* ref_fn;
19261926

1927-
if (!(tag = sam_hdr_find_key(fd->header, ty, "M5", NULL)))
1927+
if (!(tag = sam_hdr_find_key(fd->header, ty, "M5", NULL))){
19281928
no_m5 = 1;
1929+
}
19291930
else {
19301931
const char* m5_str = tag->str+3;
19311932
hts_log_info("Querying ref %s", m5_str);

htslib/ref.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ extern "C" {
3535

3636
/* m5_to_ref() - returns the reference genome that has a given MD5 string
3737
* @param m5_str: The m5 string to query
38-
* @returns: A hFile with a reference genome
38+
* @returns: A hFILE containing a file pointer to a reference genome.
3939
* NULL on failure
4040
*
4141
* Note: This function is not currently thread safe, so locks
@@ -47,7 +47,7 @@ hFILE* m5_to_ref(const char *m5_str);
4747
/* m5_to_path() - returns a path to a reference genome that has a
4848
* given MD5 string
4949
* @param m5_str: The m5 string to query
50-
* @returns: A path to a reference genome
50+
* @returns: A path to the correct reference genome.
5151
* NULL on failure
5252
*
5353
* Note: This function is not currently thread safe, so locks

0 commit comments

Comments
 (0)