public class AutocatalyticNetworkDetection extends AnalysisBase
The algorithm iterates over two modified breath first searches until none of them can exclude species / reactions any more. The first bfs removes reactions that are not catalyzed in the remaining network (and molecule species that are only produced by that reactions). The second bfs removes species, that do not have a path from each necessary food molecule.
Constructor and Description |
---|
AutocatalyticNetworkDetection(Network network)
Creates the AutocatalyticDetection by using the in the network built in
CatalystIterator . |
AutocatalyticNetworkDetection(Network network,
CatalystIterator cataIt)
Creates the AutocatalyticDetection by using the second argument as
CatalystIterator . |
Modifier and Type | Method and Description |
---|---|
void |
annotate(String field,
String value)
Adds annotations to each autocatalytic reaction / species.
|
int |
detect()
Performs the detection algorithm.
|
cern.colt.bitvector.BitVector |
getAutocatalyticReactions()
Gets the autocatalytic reactions as
BitVector . |
cern.colt.bitvector.BitVector |
getAutocatalyticSpecies()
Gets the autocatalytic species as
BitVector . |
boolean |
isAutocatalyticReaction(int reaction)
Returns true if the given reaction is autocatalytic.
|
boolean |
isAutocatalyticSpecies(int species)
Returns true if the given species is autocatalytic.
|
bfs, dfs, search
public AutocatalyticNetworkDetection(Network network)
CatalystIterator
. The network has to implement CatalystIterator
, otherwise an
IllegalArgumentException
is thrown.network
- the network to detect the autocatalytic set inpublic AutocatalyticNetworkDetection(Network network, CatalystIterator cataIt)
CatalystIterator
.network
- network the network to detect the autocatalytic set incataIt
- a CatalystIterator
for the networkpublic int detect()
getAutocatalyticReactions
,
getAutocatalyticSpecies
,
isAutocatalyticReaction
,
isAutocatalyticSpecies
,
annotate
public cern.colt.bitvector.BitVector getAutocatalyticReactions()
BitVector
. Throws a RuntimeException
if the detection algorithms has not been called.public cern.colt.bitvector.BitVector getAutocatalyticSpecies()
BitVector
. Throws a RuntimeException
if
the detection algorithms has not been called.public boolean isAutocatalyticReaction(int reaction)
RuntimeException
if
the detection algorithms has not been called.reaction
- the reaction indexpublic boolean isAutocatalyticSpecies(int species)
RuntimeException
if
the detection algorithms has not been called.species
- the species indexCopyright © 2007–2021. All rights reserved.