public class ExtractSubNetwork extends ModifierNetwork
ModifierNetwork
, the network is not copied but the indices are redirected.
The subnet to be extracted has to be given by BitVector
s containing a 1 for an index to
be in the extracted subnet.
This class can be used e.g. to extract only the autocatalytic set of an evolved network.
Constructor and Description |
---|
ExtractSubNetwork(Network originalNet,
cern.colt.bitvector.BitVector reactions,
cern.colt.bitvector.BitVector species)
Extracts a given subnet from a network.
|
Modifier and Type | Method and Description |
---|---|
AmountManager |
getAmountManager()
Gets the
AmountManager for the extracted subnet. |
AnnotationManager |
getAnnotationManager()
Gets an
AnnotationManager for the redirected index space. |
long |
getInitialAmount(int species)
Gets the initial amount of the specified molecule species.
|
int |
getNumReactions()
Gets the number of reactions in the extracted subnet.
|
int |
getNumSpecies()
Gets the number of species in the extracted subnet.
|
int[] |
getProducts(int reaction)
Gets the products of a reaction.
|
PropensityCalculator |
getPropensityCalculator()
Gets the
PropensityCalculator for the extracted subnet. |
int[] |
getReactants(int reaction)
Gets the reactants of a reaction.
|
String |
getReactionName(int index)
Gets a string representation of the reaction
|
int |
getSpeciesByName(String name)
Gets the index of the species by its name.
|
String |
getSpeciesName(int index)
Gets the name of the species with given index.
|
void |
setInitialAmount(int species,
long value)
Sets the initial amount of the specified molecule species.
|
getName, getOriginalNetwork, getParentNetwork
public ExtractSubNetwork(Network originalNet, cern.colt.bitvector.BitVector reactions, cern.colt.bitvector.BitVector species)
BitVector
s
containing a 1 for each index which has to be in the extracted subnet.originalNet
- network containing the subnetreactions
- reactions of the subnetspecies
- species of the subnetpublic AnnotationManager getAnnotationManager()
AnnotationManager
for the redirected index space.getAnnotationManager
in interface Network
getAnnotationManager
in class ModifierNetwork
AnnotationManager
objectpublic int getNumReactions()
getNumReactions
in interface Network
getNumReactions
in class ModifierNetwork
public int getNumSpecies()
getNumSpecies
in interface Network
getNumSpecies
in class ModifierNetwork
public int[] getProducts(int reaction)
getProducts
in interface Network
getProducts
in class ModifierNetwork
reaction
- the index of the reactionpublic int[] getReactants(int reaction)
getReactants
in interface Network
getReactants
in class ModifierNetwork
reaction
- the index of the reactionpublic long getInitialAmount(int species)
Network
getInitialAmount
in interface Network
getInitialAmount
in class ModifierNetwork
species
- index of the speciespublic void setInitialAmount(int species, long value)
Network
setInitialAmount
in interface Network
setInitialAmount
in class ModifierNetwork
species
- index of the speciesvalue
- initial amount of the speciespublic String getSpeciesName(int index)
getSpeciesName
in interface Network
getSpeciesName
in class ModifierNetwork
index
- index of the speciespublic int getSpeciesByName(String name)
getSpeciesByName
in interface Network
getSpeciesByName
in class ModifierNetwork
name
- name of the speciespublic AmountManager getAmountManager()
AmountManager
for the extracted subnet.getAmountManager
in interface Network
getAmountManager
in class ModifierNetwork
public PropensityCalculator getPropensityCalculator()
PropensityCalculator
for the extracted subnet.getPropensityCalculator
in interface Network
getPropensityCalculator
in class ModifierNetwork
public String getReactionName(int index)
getReactionName
in interface Network
getReactionName
in class ModifierNetwork
index
- index of the reactionCopyright © 2007–2021. All rights reserved.