Skip to main content

Table 1

From: A consolidation algorithm for genomes fractionated after higher order polyploidization

(Consolidation algorithm)

Input: diploid genome D, ancient (2k)-ploid genome P, gene set L

Output: gene set L', each element of L' is a virtual gene shared between D and P, the set of the virtual genes forms a partition of D .

1:  for each chromosome c in the diploid genome do

2:    recentTermundefined

3:    for each gene g on chromosome c do

4:      for each occurrence occ of gene g on the hexaploid genome do

5:        create new terminal unit newTerm, set link to previous terminal unit

6:        if newTerm is not the first terminal unit on its chromosome then

7:          turn the older terminal unit into non-terminal unit newNonTerm

8:          update links between terminal units

9:          set startPos(newNonTerm), rMin(newNonTerm), rMax(newNonTerm)

10:       end if

11:       recentTermnewTerm

12:     end for

13:     [rMin min , rMax max ] ← [g, g]

14:     currUnitnewTerm

15:     termCount ←0

16:     minStartPosundef

17:     while currUnit exists and termCountk and rMax max g do

18:       if currUnit is a terminal gene then

19:         termCounttermCount + 1

20:         rMin min min(rMin min , gene of currUnit)

21:         if rMin min ≥ gene of currUnit then

22:           minStartPos ← gene of currUnit

23:         end if

24:       end if

25:     if currUnit is a non-terminal unit then

26:       if rMax(currUnit) ≤ g then

27:         while prevUnit(currUnit) is non-terminal and rMax(prevUnit(currUnit)) ≤ g do

28:         merge prevUnit(currUnit) into currUnit

29:         update link to previous unit

30:         update startPos(currUnit), rMax(currUnit) and rMin(currUnit)

31:       end while

32:       if startPos(currUnit) exists and rMin min startPos(currUnit) then

33:         minStartPosstartPos(currUnit)

34:       end if

35:     end if

36:     rMin min min(rMin min , currUnit.rMin)

37:     rMax max max(rMax max , currUnit.rMax)

38:    end if

39:    currUnitprevUnit(currUnit)

40:    end while

41:    add [minStartPos, g] to list of virtual intervals

42:   end for

43: end for

44: remove redundant intervals from list of virtual intervals to obtain a partition of D