Skip to content

Commit 72e3397

Browse files
committed
up
1 parent e26430e commit 72e3397

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

src/network_analysis.jl

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -928,46 +928,3 @@ function treeweight(t::SimpleDiGraph, g::SimpleDiGraph, distmx::Matrix)
928928
end
929929
prod
930930
end
931-
932-
"""
933-
cycles(rs::ReactionSystem)
934-
935-
Returns the matrix of cycles (or flux vectors), or reaction fluxes at steady state. These correspond to right eigenvectors of the stoichiometric matrix. Equivalent to [`fluxmodebasis`](@ref).
936-
"""
937-
938-
function cycles(rs::ReactionSystem)
939-
nps = get_networkproperties(rs)
940-
nsm = netstoichmat(rs)
941-
!isempty(nps.cyclemat) && return nps.cyclemat
942-
nps.cyclemat = cycles(nsm; col_order = nps.col_order)
943-
nps.cyclemat
944-
end
945-
946-
function cycles(nsm::T; col_order = nothing) where {T <: AbstractMatrix}
947-
948-
# compute the left nullspace over the integers
949-
N = MT.nullspace(nsm; col_order)
950-
951-
# if all coefficients for a cycle are negative, make positive
952-
for Nrow in eachcol(N)
953-
all(r -> r <= 0, Nrow) && (Nrow .*= -1)
954-
end
955-
956-
# check we haven't overflowed
957-
iszero(nsm * N) || error("Calculation of the cycle matrix was inaccurate, "
958-
* "likely due to numerical overflow. Please use a larger integer "
959-
* "type like Int128 or BigInt for the net stoichiometry matrix.")
960-
961-
T(N)
962-
end
963-
964-
"""
965-
fluxvectors(rs::ReactionSystem)
966-
967-
See documentation for [`cycles`](@ref).
968-
"""
969-
970-
function fluxmodebasis(rs::ReactionSystem)
971-
cycles(rs)
972-
end
973-

0 commit comments

Comments
 (0)