Class UnambiguousExactProteinComparator

  • All Implemented Interfaces:
    Comparator<Protein>

    public class UnambiguousExactProteinComparator
    extends ProteinComparator
    Unambiguous exact proteins comparator. It will first use UnambiguousExactPolymerComparator to compare the basic interactor properties If the basic interactor properties are the same, It will look for uniprotkb identifier (The interactor with non null uniprot id will always come first). If the uniprotkb identifiers are identical, it will look at the Refseq identifiers (The interactor with non null refseq id will always come first). If the Refseq and uniport identifiers are not set, it will look at the rogids (The interactor with non null rogid will always come first). If the rogids are identical, it will look at the gene names (The interactor with non null gene name will always come first).
    Since:
    17/01/13
    Version:
    $Id$
    Author:
    Marine Dumousseau (marine@ebi.ac.uk)
    • Constructor Detail

      • UnambiguousExactProteinComparator

        public UnambiguousExactProteinComparator()
        Creates a new DefaultExactProteinComparator. It will uses a DefaultExactPolymerComparator to compare interactor properties and a OrganismTaxIdComparator to compares organism.
    • Method Detail

      • compare

        public int compare​(Protein protein1,
                           Protein protein2)
        Description copied from class: ProteinComparator
        It will first use UnambiguousPolymerComparator to compare the basic interactor properties If the basic interactor properties are the same, It will look for uniprotkb identifier (The interactor with non null uniprot id will always come first). If the uniprotkb identifiers are identical, it will look at the Refseq identifiers (The interactor with non null refseq id will always come first). If the Refseq and uniport identifiers are not set, it will look at the rogids (The interactor with non null rogid will always come first). If the rogids are identical, it will look at the gene names (The interactor with non null gene name will always come first).
        Specified by:
        compare in interface Comparator<Protein>
        Overrides:
        compare in class ProteinComparator
        Parameters:
        protein1 - a Protein object.
        protein2 - a Protein object.
        Returns:
        a int.
      • areEquals

        public static boolean areEquals​(Protein protein1,
                                        Protein protein2)
        Use DefaultExactProteinComparator to know if two proteins are equals.
        Parameters:
        protein1 - a Protein object.
        protein2 - a Protein object.
        Returns:
        true if the two proteins are equal