public class Stoichiometry extends Object
SubunitClusterer
,
and implements human-readable representation using various strategies.Modifier and Type | Class and Description |
---|---|
static class |
Stoichiometry.StringOverflowStrategy
What to do when the number of
SubunitCluster exceeds the length of the alphabet. |
Constructor and Description |
---|
Stoichiometry(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.
|
Modifier and Type | Method and Description |
---|---|
Stoichiometry |
combineWith(Stoichiometry other)
Make a combined Stoichiometry object of this> and the other>.
|
String |
getAlphabet() |
List<SubunitCluster> |
getClusters() |
Stoichiometry |
getComponent(int i)
Make a Stoichiometry object that corresponds to a single component.
|
Stoichiometry.StringOverflowStrategy |
getStrategy() |
boolean |
isPseudoStoichiometric()
A pseudostoichiometric
SubunitCluster was obtained using the
SubunitClustererMethod.STRUCTURE similarity,
or SubunitClustererMethod.SEQUENCE similarity with low scores. |
int |
numberOfComponents() |
void |
resetAlphas()
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 |
setStrategy(Stoichiometry.StringOverflowStrategy strategy)
Change string representation of a stoichiometry in case number of clusters exceeds number of letters in the alphabet.
|
String |
toString() |
public Stoichiometry(List<SubunitCluster> clusters)
clusters
- List of SubunitCluster
that defines assembly composition.public Stoichiometry(List<SubunitCluster> clusters, boolean resetAlphas)
clusters
- List of SubunitCluster
that defines assembly composition.resetAlphas
- Whether to keep alphas assigned to SubunitCluster
object (useful for local symmetry detection)
or to generate them anew.public Stoichiometry(List<SubunitCluster> clusters, Stoichiometry.StringOverflowStrategy strategy)
SubunitCluster
objects will be reset.clusters
- List of SubunitCluster
that defines assembly composition.strategy
- What to do if number of SubunitCluster
exceeds the alphabet length.public Stoichiometry(List<SubunitCluster> clusters, Stoichiometry.StringOverflowStrategy strategy, boolean resetAlphas)
clusters
- List of SubunitCluster
that defines assembly composition.strategy
- What to do if number of SubunitCluster
exceeds the alphabet length.resetAlphas
- Whether to keep alphas assigned to SubunitCluster
object (useful for local symmetry detection)
or to generate them anew.public Stoichiometry(List<SubunitCluster> clusters, Function<List<SubunitCluster>,String> customStringGenerator)
clusters
- List of SubunitCluster
that defines assembly composition.customStringGenerator
- A function which produces a string for a composition (list of subunit clusters).public void resetAlphas()
public List<SubunitCluster> getClusters()
SubunitCluster
, ordered by the number of subunits (decreasing).public int numberOfComponents()
public Stoichiometry combineWith(Stoichiometry other)
Stoichiometry
object.public Stoichiometry getComponent(int i)
i
- component indexStoichiometry
object.public Stoichiometry.StringOverflowStrategy getStrategy()
Stoichiometry.StringOverflowStrategy
used in this stoichiometry
to construct human-readable representation in case number
of clusters exceeds number of letters in the alphabet.public void setStrategy(Stoichiometry.StringOverflowStrategy strategy)
strategy
- Stoichiometry.StringOverflowStrategy
used in this stoichiometry
to construct human-readable representation in case number
of clusters exceeds number of letters in the alphabet.public void setCustomStringGenerator(Function<List<SubunitCluster>,String> customStringGenerator)
customStringGenerator
- A function which accepts a list of subunit clusters and returns a string.public String getAlphabet()
public void setAlphabet(String alphabet)
alphabet
- a sequence of characters used in this stoichiometry to construct human-readable representation.public boolean isPseudoStoichiometric()
SubunitCluster
was obtained using the
SubunitClustererMethod.STRUCTURE
similarity,
or SubunitClustererMethod.SEQUENCE
similarity with low scores.Copyright © 2000–2019 BioJava. All rights reserved.