Skip to content

Commit cd39ac3

Browse files
committed
fai clean up
1 parent f0fda91 commit cd39ac3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/genotype.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ namespace torali
135135
boost::posix_time::ptime now = boost::posix_time::second_clock::local_time();
136136
std::cerr << '[' << boost::posix_time::to_simple_string(now) << "] " << "SV annotation" << std::endl;
137137

138-
const faidx_t* fai = fai_load(c.genome.string().c_str());
138+
faidx_t* fai = fai_load(c.genome.string().c_str());
139139
for(int32_t refIndex=0; refIndex < (int32_t) hdr[0]->n_targets; ++refIndex) {
140140
// Fetch breakpoints
141141
typedef std::multimap<int32_t, int32_t> TBreakpointMap;
@@ -362,6 +362,7 @@ namespace torali
362362
if (seq != NULL) free(seq);
363363
}
364364
// Clean-up
365+
fai_destroy(fai);
365366
for(unsigned int file_c = 0; file_c < c.files.size(); ++file_c) {
366367
bam_hdr_destroy(hdr[file_c]);
367368
hts_idx_destroy(idx[file_c]);

0 commit comments

Comments
 (0)