Class SubunitCluster

java.lang.Object
org.biojava.nbio.structure.cluster.SubunitCluster

public class SubunitCluster extends 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 Details

    • 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, List<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 Details

    • getAlpha

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

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

      public 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
    • 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 - SubunitCluster
      params - SubunitClustererParameters, with information whether to use local or global alignment, sequence identity and coverage thresholds. Threshold values lower than 0.7 are not recommended. Use mergeStructure(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 - SubunitCluster
      params - SubunitClustererParameters, with information whether to use local or global alignment, sequence identity and coverage thresholds. Threshold values lower than 0.7 are not recommended. Use mergeStructure(org.biojava.nbio.structure.cluster.SubunitCluster, org.biojava.nbio.structure.cluster.SubunitClustererParameters) for lower values.
      alignerType - parameter for the sequence alignment algorithm
      gapPenalty - parameter for the sequence alignment algorithm
      subsMatrix - 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 - 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
    • getClustererMethod

      public SubunitClustererMethod getClustererMethod()
      Returns:
      the SubunitClustererMethod used for clustering the Subunits
    • getAlignedAtomsSubunits

      public 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 String toString()
      Overrides:
      toString in class 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.