Table 1

Algorithm 1 (LinearMOI)


Input: sorted list of all intervals interval[1..n]; number of collections k

Variables: largest end point seen so far in each collection endPoint[1..k]; c[0..l]

1: endPoint[1..k] 0

2: prevEnd ← 0

3: min ← 0

4: c[0] ← k; c[1..l] 0

5: for all <a onClick="popup('http://www.biomedcentral.com/1471-2105/13/S19/S7/mathml/M4','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/13/S19/S7/mathml/M4">View MathML</a>interval[1..n] do

6:     if end >endPoint[j] then

7:         c[endPoint[j]] ← c[endPoint[j]] - 1

8:         c[end] ← c[end] + 1

9:         endPoint[j] ← end

10:   end if

11:   if all intervals with recent start position processed then

12:       while c[min] = 0 do

13:         min ← min + 1

14:       end while

15:       if prevEnd < min and min ≥ start then

16:         output MOI(start, min)

17:         prevEnd ← min

18:       end if

19:   end if

20: end for


Jahn et al. BMC Bioinformatics 2012 13(Suppl 19):S7   doi:10.1186/1471-2105-13-S19-S7

Open Data