Currently if an aligner produces more alignments for read 1 than read 2 then TEpeaks will segfault. The following will patch that:
--- a/src/TEToolkit/Parser.cpp
+++ b/src/TEToolkit/Parser.cpp
@@ -245,7 +245,8 @@ void process_aligned_fragment(global_context_t<T> * global_context, thread_conte
//get the first alignment of the first segment
cur_read1 = (bam1_t *)read_pair->first_reads[k];
- if (read_pair->second_reads.size() > 0) {
+ cur_read2 = NULL;
+ if (read_pair->second_reads.size() > k) {
//the first alignment of the second segment
cur_read2 = (bam1_t *)read_pair->second_reads[k];
}
I'm not entirely sure why this scenario would arise, but one of our post-docs just managed to trigger it using a BAM file produced by STAR 2.6.0c
Currently if an aligner produces more alignments for read 1 than read 2 then TEpeaks will segfault. The following will patch that:
I'm not entirely sure why this scenario would arise, but one of our post-docs just managed to trigger it using a BAM file produced by STAR 2.6.0c