Class SubunitCluster
java.lang.Object
org.biojava.nbio.structure.cluster.SubunitCluster
A SubunitCluster contains a set of equivalent
QuatSymmetrySubunits
,
the set of equivalent residues (EQR) between Subunit
and a
Subunit
representative. It also stores the method used for
clustering.
This class allows the comparison and merging of SubunitClusters.
- Since:
- 5.0.0
- Author:
- Aleix Lafita
-
Constructor Summary
ConstructorDescriptionCreate the cluster manually by specifying subunits and the equivalent residuesSubunitCluster
(Subunit subunit) A constructor from a single Subunit.SubunitCluster
(SubunitCluster other, List<Integer> subunitsToRetain) A copy constructor with the possibility of removing subunits. -
Method Summary
Modifier and TypeMethodDescriptionboolean
divideInternally
(SubunitClustererParameters clusterParams) Analyze the internal symmetry of the SubunitCluster and divide itsSubunit
into the internal repeats (domains) if they are internally symmetric.Atom[]
getAlignedAtomsSubunit
(int index) getAlpha()
A letter that is assigned to this cluster in stoichiometry.The multiple alignment is calculated from the equivalent residues in the SubunitCluster.Subunits contained in the SubunitCluster.boolean
Tells whether the other SubunitCluster contains exactly the same Subunit.boolean
isIdenticalTo
(SubunitCluster other) Tells whether the other SubunitCluster contains exactly the same Subunit.boolean
int
length()
boolean
mergeIdentical
(SubunitCluster other) Merges the other SubunitCluster into this one if it contains exactly the same Subunit.boolean
Merges the other SubunitCluster into this one if it contains exactly the same Subunit.boolean
mergeSequence
(SubunitCluster other, SubunitClustererParameters params) Merges the other SubunitCluster into this one if their representatives sequences are similar (according to the criteria in params).boolean
mergeSequence
(SubunitCluster other, SubunitClustererParameters params, Alignments.PairwiseSequenceAlignerType alignerType, GapPenalty gapPenalty, SubstitutionMatrix<AminoAcidCompound> subsMatrix) Merges the other SubunitCluster into this one if their representatives sequences are similar (according to the criteria in params).boolean
mergeStructure
(SubunitCluster other, SubunitClustererParameters params) Merges the other SubunitCluster into this one if their representative Atoms are structurally similar (according to the criteria in params).void
A letter that is assigned to this cluster in stoichiometry.int
size()
toString()
-
Constructor Details
-
SubunitCluster
A constructor from a single Subunit. To obtain a SubunitCluster with multiple Subunits, initialize different SubunitClusters and merge them.- Parameters:
subunit
- initial Subunit
-
SubunitCluster
A copy constructor with the possibility of removing subunits. No re-clustering is done.- Parameters:
other
- reference SubunitClustersubunitsToRetain
- which subunits to copy to this cluster
-
SubunitCluster
Create the cluster manually by specifying subunits and the equivalent residues- Parameters:
subunits
- List of aligned subunitssubunitEQR
- Double list giving the aligned residue indices in each subunit
-
-
Method Details
-
getAlpha
A letter that is assigned to this cluster in stoichiometry.- Returns:
- alpha String
-
setAlpha
A letter that is assigned to this cluster in stoichiometry.- Parameters:
alpha
- String
-
getSubunits
Subunits contained in the SubunitCluster.- Returns:
- an unmodifiable view of the original List
-
isIdenticalTo
Tells whether the other SubunitCluster contains exactly the same Subunit. This is checked by String equality of their residue one-letter sequences.- Parameters:
other
- SubunitCluster- Returns:
- true if the SubunitClusters are identical, false otherwise
-
isIdenticalByEntityIdTo
Tells whether the other SubunitCluster contains exactly the same Subunit. This is checked by equality of their entity identifiers if they are present.- Parameters:
other
- SubunitCluster- Returns:
- true if the SubunitClusters are identical, false otherwise
-
mergeIdentical
Merges the other SubunitCluster into this one if it contains exactly the same Subunit. This is checked byisIdenticalTo(SubunitCluster)
.- Parameters:
other
- SubunitCluster- Returns:
- true if the SubunitClusters were merged, false otherwise
-
mergeIdenticalByEntityId
Merges the other SubunitCluster into this one if it contains exactly the same Subunit. This is checked by comparing the entity identifiers of the subunits if one can be found. Thus this only makes sense when the subunits are complete chains of a deposited PDB entry.- Parameters:
other
- SubunitCluster- Returns:
- true if the SubunitClusters were merged, false otherwise
-
mergeSequence
public boolean mergeSequence(SubunitCluster other, SubunitClustererParameters params) throws CompoundNotFoundException Merges the other SubunitCluster into this one if their representatives sequences are similar (according to the criteria in params).The sequence alignment is performed using linear
SimpleGapPenalty
and BLOSUM62 as scoring matrix.- Parameters:
other
- SubunitClusterparams
- SubunitClustererParameters, with information whether to use local or global alignment, sequence identity and coverage thresholds. Threshold values lower than 0.7 are not recommended. UsemergeStructure(org.biojava.nbio.structure.cluster.SubunitCluster, org.biojava.nbio.structure.cluster.SubunitClustererParameters)
for lower values.- Returns:
- true if the SubunitClusters were merged, false otherwise
- Throws:
CompoundNotFoundException
-
mergeSequence
public boolean mergeSequence(SubunitCluster other, SubunitClustererParameters params, Alignments.PairwiseSequenceAlignerType alignerType, GapPenalty gapPenalty, SubstitutionMatrix<AminoAcidCompound> subsMatrix) throws CompoundNotFoundException Merges the other SubunitCluster into this one if their representatives sequences are similar (according to the criteria in params).The sequence alignment is performed using linear
SimpleGapPenalty
and BLOSUM62 as scoring matrix.- Parameters:
other
- SubunitClusterparams
-SubunitClustererParameters
, with information whether to use local or global alignment, sequence identity and coverage thresholds. Threshold values lower than 0.7 are not recommended. UsemergeStructure(org.biojava.nbio.structure.cluster.SubunitCluster, org.biojava.nbio.structure.cluster.SubunitClustererParameters)
for lower values.alignerType
- parameter for the sequence alignment algorithmgapPenalty
- parameter for the sequence alignment algorithmsubsMatrix
- parameter for the sequence alignment algorithm- Returns:
- true if the SubunitClusters were merged, false otherwise
- Throws:
CompoundNotFoundException
-
mergeStructure
public boolean mergeStructure(SubunitCluster other, SubunitClustererParameters params) throws StructureException Merges the other SubunitCluster into this one if their representative Atoms are structurally similar (according to the criteria in params).- Parameters:
other
- SubunitClusterparams
-SubunitClustererParameters
, with information on what alignment algorithm to use, RMSD/TMScore and structure coverage thresholds.- Returns:
- true if the SubunitClusters were merged, false otherwise
- Throws:
StructureException
-
divideInternally
Analyze the internal symmetry of the SubunitCluster and divide itsSubunit
into the internal repeats (domains) if they are internally symmetric.- Parameters:
clusterParams
-SubunitClustererParameters
with fields used as follows: structureCoverageThreshold the minimum coverage of all repeats in the Subunit rmsdThreshold the maximum allowed RMSD between the repeats minimumSequenceLength the minimum length of the repeating units- Returns:
- true if the cluster was internally symmetric, false otherwise
- Throws:
StructureException
-
size
- Returns:
- the number of Subunits in the cluster
-
length
- Returns:
- the number of aligned residues between Subunits of the cluster
-
getClustererMethod
- Returns:
- the
SubunitClustererMethod
used for clustering the Subunits
-
getAlignedAtomsSubunits
-
getAlignedAtomsSubunit
- Parameters:
index
- Subunit index in the Cluster- Returns:
- An Atom array of length
length()
with the aligned Atoms from the selected Subunit in the Cluster
-
getMultipleAlignment
The multiple alignment is calculated from the equivalent residues in the SubunitCluster. The alignment is recalculated every time the method is called (no caching).- Returns:
- MultipleAlignment representation of the aligned residues in this Subunit Cluster
- Throws:
StructureException
-
toString
-
isPseudoStoichiometric
- Returns:
- true if this cluster is considered pseudo-stoichiometric (i.e., was either clustered by structure, or by sequence with low scores), false otherwise.
-