Constructor and Description |
---|
NetworkTools() |
Modifier and Type | Method and Description |
---|---|
static boolean |
areEqual(Network a,
Network b)
Gets whether or not the two given networks contain the same species, the same reactions and
yield the same propensities when the amounts of each reactant are respectively 1, 5, 10, 100.
|
static void |
dumpMathTree(MathTree tree)
Dumps the MathTree to stdout.
|
static void |
dumpMathTree(MathTree tree,
Writer writer)
Dumps the math tree to the given
Writer . |
static void |
dumpNetwork(Network net)
Dumps the network to stdout.
|
static void |
dumpNetwork(Network net,
Writer writer)
Dumps the network to the given
Writer . |
static double |
getConstantBySettingReactantsToStoich(Network net,
int r)
Gets the reaction rate constant by setting the reactant amounts to the stoichiometric
coefficient.
|
static String[] |
getReactionNames(Network net,
int[] reaction)
Transforms the reaction indices in the given array to the corresponding names.
|
static String |
getReactionNameWithAmounts(Network net,
int... reactions)
Gets a string representation of the given reactions and the amounts of each participating
species in parentheses.
|
static int[] |
getReactionsOf(Network net,
String[] speciesName)
Gets the reaction whose products / reactants are in speciesName
|
static int[] |
getSpeciesIndices(Network net,
String[] speciesName)
Transforms the species names in the given array to the corresponding indices.
|
static String[] |
getSpeciesNames(Network net,
int[] species)
Transforms the species indices in the given array to the corresponding names.
|
static String |
getSpeciesNameWithAmount(Network net,
int... species)
Gets the species names together with its actual amount in parentheses
|
static Network |
loadNetwork(File file)
Loads a network from file identifying the type (FernML/SBML).
|
static void |
useActualAmountAsInitialAmount(Network net)
Copies the actual amount of the species in the network to its initial amount.
|
public static double getConstantBySettingReactantsToStoich(Network net, int r)
net
- networkr
- reaction indexpublic static boolean areEqual(Network a, Network b)
a
- first networkb
- first networkpublic static Network loadNetwork(File file) throws IOException, org.jdom.JDOMException, FeatureNotSupportedException, ClassNotFoundException
file
- network fileorg.jdom.JDOMException
IOException
FeatureNotSupportedException
ClassNotFoundException
public static String getSpeciesNameWithAmount(Network net, int... species)
net
- networkspecies
- species indicespublic static String getReactionNameWithAmounts(Network net, int... reactions)
net
- networkreactions
- reaction indicespublic static String[] getReactionNames(Network net, int[] reaction)
net
- the networkreaction
- reaction indicespublic static String[] getSpeciesNames(Network net, int[] species)
net
- the networkspecies
- species indicespublic static int[] getSpeciesIndices(Network net, String[] speciesName)
net
- the networkspeciesName
- species namespublic static int[] getReactionsOf(Network net, String[] speciesName)
net
- networkspeciesName
- names of speciespublic static void dumpNetwork(Network net)
net
- networkpublic static void dumpNetwork(Network net, Writer writer) throws IOException
Writer
.net
- networkIOException
public static void dumpMathTree(MathTree tree)
tree
- mathtreepublic static void dumpMathTree(MathTree tree, Writer writer) throws IOException
Writer
.tree
- mathtreeIOException
public static void useActualAmountAsInitialAmount(Network net)
net
- network.Copyright © 2007–2021. All rights reserved.