Skip to content

Commit c81e408

Browse files
author
Jeremiah Wala
committed
changed to open interval merge in merge overlapping
1 parent b7b3378 commit c81e408

5 files changed

+6
-5
lines changed

SeqLib/GenomicRegionCollection.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ void GenomicRegionCollection<T>::MergeOverlappingIntervals() {
343343
typename std::list<T>::iterator inext(intervals.begin());
344344
++inext;
345345
for (typename std::list<T>::iterator i(intervals.begin()), iend(intervals.end()); inext != iend;) {
346-
if((i->pos2 > inext->pos1) && (i->chr == inext->chr))
346+
if((i->pos2 >= inext->pos1) && (i->chr == inext->chr)) // change >= to > to not overlap touching intervals (eg [4,5][5,6])
347347
{
348348
if(i->pos2 >= inext->pos2) intervals.erase(inext++);
349349
else if(i->pos2 < inext->pos2)

SeqLib/GenomicRegionCollection.h

+1
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ class GenomicRegionCollection {
115115
void CreateTreeMap();
116116

117117
/** Reduces the GenomicRegion objects to minimal set by merging overlapping intervals
118+
* @note This will merge intervals that touch. eg [4,6] and [6,8]
118119
* @note This will also call CreateTreeMap() at end to re-create the interval tree
119120
*/
120121
void MergeOverlappingIntervals();

fermi-lite

src/Makefile.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ am__aclocal_m4_deps = $(top_srcdir)/configure.ac
3939
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
4040
$(ACLOCAL_M4)
4141
mkinstalldirs = $(install_sh) -d
42-
CONFIG_HEADER = $(top_builddir)/config.h
4342
CONFIG_CLEAN_FILES =
4443
CONFIG_CLEAN_VPATH_FILES =
4544
LIBRARIES = $(noinst_LIBRARIES)
@@ -60,7 +59,7 @@ am_libseqlib_a_OBJECTS = libseqlib_a-FastqReader.$(OBJEXT) \
6059
libseqlib_a-FermiAssembler.$(OBJEXT) \
6160
libseqlib_a-BamHeader.$(OBJEXT)
6261
libseqlib_a_OBJECTS = $(am_libseqlib_a_OBJECTS)
63-
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
62+
DEFAULT_INCLUDES = -I.@am__isrc@
6463
depcomp = $(SHELL) $(top_srcdir)/depcomp
6564
am__depfiles_maybe = depfiles
6665
am__mv = mv -f
@@ -139,6 +138,7 @@ am__quote = @am__quote@
139138
am__tar = @am__tar@
140139
am__untar = @am__untar@
141140
bindir = @bindir@
141+
boost_lib = @boost_lib@
142142
build_alias = @build_alias@
143143
builddir = @builddir@
144144
datadir = @datadir@

0 commit comments

Comments
 (0)