Class UnambiguousExactGeneComparator

  • All Implemented Interfaces:
    Comparator<Gene>

    public class UnambiguousExactGeneComparator
    extends GeneComparator
    Unambiguous exact gene comparator. It will first use UnambiguousExactInteractorBaseComparator to compare the basic interactor properties If the basic interactor properties are the same, It will look at ensembl identifier if both are set. If the ensembl identifiers are not both set, it will look at the ensemblGenome identifiers. If at least one ensemblGemome identifiers is not set, it will look at the entrez/gene id. If at least one entrez/gene id is not set, it will look at the refseq identifiers.
    Since:
    17/01/13
    Version:
    $Id$
    Author:
    Marine Dumousseau (marine@ebi.ac.uk)
    • Constructor Detail

      • UnambiguousExactGeneComparator

        public UnambiguousExactGeneComparator()
        Creates a new UnambiguousExactGeneComparator. It will uses a DefaultExatctInteractorBaseComparator to compare interactor properties
    • Method Detail

      • compare

        public int compare​(Gene gene1,
                           Gene gene2)
        It will first use UnambiguousExactInteractorBaseComparator to compare the basic interactor properties If the basic interactor properties are the same, It will look at ensembl identifier if both are set. If the ensembl identifiers are not both set, it will look at the ensemblGenome identifiers. If at least one ensemblGemome identifiers is not set, it will look at the entrez/gene id. If at least one entrez/gene id is not set, it will look at the refseq identifiers.
        Specified by:
        compare in interface Comparator<Gene>
        Overrides:
        compare in class GeneComparator
        Parameters:
        gene1 - a Gene object.
        gene2 - a Gene object.
        Returns:
        a int.
      • areEquals

        public static boolean areEquals​(Gene gene1,
                                        Gene gene2)
        Use DefaultGeneComparator to know if two genes are equals.
        Parameters:
        gene1 - a Gene object.
        gene2 - a Gene object.
        Returns:
        true if the two genes are equal