Class Stoichiometry
java.lang.Object
org.biojava.nbio.structure.symmetry.core.Stoichiometry
A utility object that describes Stoichiometry (composition of a protein assembly),
determined via clustering procedure
SubunitClusterer
,
and implements human-readable representation using various strategies.- Since:
- 5.0.0
- Author:
- Dmytro Guzenko
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
What to do when the number ofSubunitCluster
exceeds the length of the alphabet. -
Constructor Summary
ConstructorDescriptionStoichiometry
(List<SubunitCluster> clusters) Constructor for Stoichiometry.Stoichiometry
(List<SubunitCluster> clusters, boolean resetAlphas) Constructor for Stoichiometry.Stoichiometry
(List<SubunitCluster> clusters, Function<List<SubunitCluster>, String> customStringGenerator) Constructor for Stoichiometry.Stoichiometry
(List<SubunitCluster> clusters, Stoichiometry.StringOverflowStrategy strategy) Constructor for Stoichiometry.Stoichiometry
(List<SubunitCluster> clusters, Stoichiometry.StringOverflowStrategy strategy, boolean resetAlphas) Constructor for Stoichiometry. -
Method Summary
Modifier and TypeMethodDescriptioncombineWith
(Stoichiometry other) Make a combined Stoichiometry object of this and the other.getComponent
(int i) Make a Stoichiometry object that corresponds to a single component.boolean
A pseudostoichiometricSubunitCluster
was obtained using theSubunitClustererMethod.STRUCTURE
similarity, orSubunitClustererMethod.SEQUENCE
similarity with low scores.int
void
Reassign alpha-strings for each cluster according to the current strategy.void
setAlphabet
(String alphabet) Change alphabet used for string representation of a stoichiometry.void
setCustomStringGenerator
(Function<List<SubunitCluster>, String> customStringGenerator) Let a user-defined function handle the entire string representation of a stoichiometry.void
Change string representation of a stoichiometry in case number of clusters exceeds number of letters in the alphabet.toString()
-
Constructor Details
-
Stoichiometry
Constructor for Stoichiometry. The default strategy is CYCLE, the letters assigned for each cluster will be reset.- Parameters:
clusters
- List ofSubunitCluster
that defines assembly composition.
-
Stoichiometry
Constructor for Stoichiometry. The default strategy is CYCLE.- Parameters:
clusters
- List ofSubunitCluster
that defines assembly composition.resetAlphas
- Whether to keep alphas assigned toSubunitCluster
object (useful for local symmetry detection) or to generate them anew.
-
Stoichiometry
Constructor for Stoichiometry. The alphas assigned toSubunitCluster
objects will be reset.- Parameters:
clusters
- List ofSubunitCluster
that defines assembly composition.strategy
- What to do if number ofSubunitCluster
exceeds the alphabet length.
-
Stoichiometry
public Stoichiometry(List<SubunitCluster> clusters, Stoichiometry.StringOverflowStrategy strategy, boolean resetAlphas) Constructor for Stoichiometry.- Parameters:
clusters
- List ofSubunitCluster
that defines assembly composition.strategy
- What to do if number ofSubunitCluster
exceeds the alphabet length.resetAlphas
- Whether to keep alphas assigned toSubunitCluster
object (useful for local symmetry detection) or to generate them anew.
-
Stoichiometry
public Stoichiometry(List<SubunitCluster> clusters, Function<List<SubunitCluster>, String> customStringGenerator) Constructor for Stoichiometry.- Parameters:
clusters
- List ofSubunitCluster
that defines assembly composition.customStringGenerator
- A function which produces a string for a composition (list of subunit clusters).
-
-
Method Details
-
resetAlphas
Reassign alpha-strings for each cluster according to the current strategy. Has no effect if custom string generator is used. -
getClusters
- Returns:
- list of
SubunitCluster
, ordered by the number of subunits (decreasing).
-
numberOfComponents
- Returns:
- Number of distinct components in this stoichiometry.
-
combineWith
Make a combined Stoichiometry object of this and the other. The combined list of clusters will be ordered by the number of subunits.- Returns:
- new
Stoichiometry
object.
-
getComponent
Make a Stoichiometry object that corresponds to a single component.- Parameters:
i
- component index- Returns:
- new
Stoichiometry
object.
-
getStrategy
- Returns:
Stoichiometry.StringOverflowStrategy
used in this stoichiometry to construct human-readable representation in case number of clusters exceeds number of letters in the alphabet.
-
setStrategy
Change string representation of a stoichiometry in case number of clusters exceeds number of letters in the alphabet. This action may invalidate alphas already assigned to the clusters.- Parameters:
strategy
-Stoichiometry.StringOverflowStrategy
used in this stoichiometry to construct human-readable representation in case number of clusters exceeds number of letters in the alphabet.
-
setCustomStringGenerator
Let a user-defined function handle the entire string representation of a stoichiometry.- Parameters:
customStringGenerator
- A function which accepts a list of subunit clusters and returns a string.
-
getAlphabet
- Returns:
- Alphabet (a sequence of characters) used in this stoichiometry to construct human-readable representation.
-
setAlphabet
Change alphabet used for string representation of a stoichiometry. This action invalidates alphas already assigned to the clusters.- Parameters:
alphabet
- a sequence of characters used in this stoichiometry to construct human-readable representation.
-
toString
-
isPseudoStoichiometric
A pseudostoichiometricSubunitCluster
was obtained using theSubunitClustererMethod.STRUCTURE
similarity, orSubunitClustererMethod.SEQUENCE
similarity with low scores.- Returns:
- true if any of the clusters is pseudostoichiometric, false otherwise
-