Skip to main content
. 2022 Apr 29;24(5):622. doi: 10.3390/e24050622
Algorithm 1 Constructing the underlying space of a fitness landscape of GRNs
Require: The fixed underlying collections of loci Γ and proteins Ω of GRNs
Ensure: The representative GRN gθ of each equivalence class θ∈Θ, and its number of
mutational neighbors Agθ(θ′) in any equivalence class θ′∈Θ
  • 1:

    k←0                            ▹ initialization

  • 2:

    gθ0← a GRN with no self-loop, where θ0 is the only equivalence class in layer Θ0

  • 3:

    Store the phenotype-preserving automorphisms Σx(gθ0).

  • 4:

    Compute Agθ0(θ0) via Equation (5).

  • 5:

    whilek<|Γ|do                    ▹ incrementally find Θ

  • 6:

        Construct and store the joining operations Φ for layer Θk.

  • 7:

        MΦ+← grouping of M+(Θk) acted by Φ

  • 8:

        Θk+1 corresponds to the groups in MΦ+.

  • 9:

        for all θ′∈Θk+1 do

  • 10:

            gθ′← a GRN in MΦ+(θ′)          ▹ choose the representative GRN

  • 11:

            Store the phenotype-preserving automorphisms Σx(gθ′).

  • 12:

        end for

  • 13:

        for all θ∈Θk,θ′∈Θk+1do     ▹ count the number of mutational neighbors

  • 14:

            Compute Agθ(θ′) and Agθ′(θ) via Equations (1) and (3).

  • 15:

        end for

  • 16:

        for all θ1′,θ2′∈Θk+1 do

  • 17:

            Compute Agθ1′(θ2′) via Equations (4) and (5).

  • 18:

        end for

  • 19:

        k←k+1

  • 20:

    end while

  • 21:

    Set any remaining, not computed Agθ(θ′) to zero.