Class SubunitCluster


  • public class SubunitCluster
    extends java.lang.Object
    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 Detail

      • SubunitCluster

        public SubunitCluster​(Subunit subunit)
        A constructor from a single Subunit. To obtain a SubunitCluster with multiple Subunits, initialize different SubunitClusters and merge them.
        Parameters:
        subunit - initial Subunit
      • SubunitCluster

        public SubunitCluster​(SubunitCluster other,
                              java.util.List<java.lang.Integer> subunitsToRetain)
        A copy constructor with the possibility of removing subunits. No re-clustering is done.
        Parameters:
        other - reference SubunitCluster
        subunitsToRetain - which subunits to copy to this cluster
    • Method Detail

      • getAlpha

        public java.lang.String getAlpha()
        A letter that is assigned to this cluster in stoichiometry.
        Returns:
        alpha String
      • setAlpha

        public void setAlpha​(java.lang.String alpha)
        A letter that is assigned to this cluster in stoichiometry.
        Parameters:
        alpha - String
      • getSubunits

        public java.util.List<Subunit> getSubunits()
        Subunits contained in the SubunitCluster.
        Returns:
        an unmodifiable view of the original List
      • isIdenticalTo

        public boolean isIdenticalTo​(SubunitCluster other)
        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

        public boolean isIdenticalByEntityIdTo​(SubunitCluster other)
        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

        public boolean mergeIdentical​(SubunitCluster other)
        Merges the other SubunitCluster into this one if it contains exactly the same Subunit. This is checked by isIdenticalTo(SubunitCluster).
        Parameters:
        other - SubunitCluster
        Returns:
        true if the SubunitClusters were merged, false otherwise
      • mergeIdenticalByEntityId

        public boolean mergeIdenticalByEntityId​(SubunitCluster other)
        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
      • 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 - SubunitCluster
        params - 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

        public boolean divideInternally​(SubunitClustererParameters clusterParams)
                                 throws StructureException
        Analyze the internal symmetry of the SubunitCluster and divide its Subunit 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

        public int size()
        Returns:
        the number of Subunits in the cluster
      • length

        public int length()
        Returns:
        the number of aligned residues between Subunits of the cluster
      • getAlignedAtomsSubunits

        public java.util.List<Atom[]> getAlignedAtomsSubunits()
        Returns:
        A List of size size() of Atom arrays of length length() with the aligned Atoms for each Subunit in the cluster
      • getAlignedAtomsSubunit

        public Atom[] getAlignedAtomsSubunit​(int index)
        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

        public MultipleAlignment getMultipleAlignment()
                                               throws StructureException
        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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isPseudoStoichiometric

        public boolean 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.