Class DomainSimilarity

java.lang.Object
org.forester.surfacing.DomainSimilarity
All Implemented Interfaces:
Comparable<DomainSimilarity>

public class DomainSimilarity extends Object implements Comparable<DomainSimilarity>
  • Field Details

  • Constructor Details

    • DomainSimilarity

      public DomainSimilarity(CombinableDomains combinable_domains, double min, double max, double mean, double median, double sd, int n, int max_difference_in_counts, int max_difference, SortedMap<Species,org.forester.surfacing.SpeciesSpecificDcData> species_data, boolean sort_by_species_count_first, boolean treat_as_binary_comparison)
    • DomainSimilarity

      public DomainSimilarity(CombinableDomains combinable_domains, int max_difference_in_counts, int max_difference, SortedMap<Species,org.forester.surfacing.SpeciesSpecificDcData> species_data, boolean sort_by_species_count_first, boolean treat_as_binary_comparison)
  • Method Details

    • compareTo

      public int compareTo(DomainSimilarity domain_similarity)
      Specified by:
      compareTo in interface Comparable<DomainSimilarity>
    • getCombinableDomainIds

      public SortedSet<String> getCombinableDomainIds(Species species_of_combinable_domain)
    • getDomainId

      public String getDomainId()
    • getMaximalDifference

      public int getMaximalDifference()
      For pairwise similarities, this should return the "difference"; for example the difference in counts for copy number based features (the same as getMaximalDifferenceInCounts(), or the number of actually different domain combinations. For pairwise similarities, this should return the difference, while for comparisons of more than two domains, this should return the maximal difference
    • getMaximalDifferenceInCounts

      public int getMaximalDifferenceInCounts()
      For pairwise similarities, this should return the difference in counts, while for comparisons of more than two domains, this should return the maximal difference in counts
      Returns:
      the (maximal) difference in counts
    • getMaximalSimilarityScore

      public double getMaximalSimilarityScore()
    • getMeanSimilarityScore

      public double getMeanSimilarityScore()
    • getMinimalSimilarityScore

      public double getMinimalSimilarityScore()
    • getN

      public int getN()
      This should return the number of pairwise distances used to calculate this similarity score
      Returns:
      the number of pairwise distances
    • getSpecies

      public SortedSet<Species> getSpecies()
    • getSpeciesCustomOrder

      public List<Species> getSpeciesCustomOrder()
    • getSpeciesData

      public SortedMap<Species,org.forester.surfacing.SpeciesSpecificDcData> getSpeciesData()
      This should return a map, which maps species names to SpeciesSpecificDomainSimilariyData
      Returns:
      SortedMap<String, SpeciesSpecificDomainSimilariyData>
    • getStandardDeviationOfSimilarityScore

      public double getStandardDeviationOfSimilarityScore()
    • setDetailedness

      public void setDetailedness(DomainSimilarityCalculator.Detailedness detailedness)
    • setSpeciesOrder

      public void setSpeciesOrder(List<Species> species_order)
    • toStringBuffer

      public StringBuffer toStringBuffer(DomainSimilarity.PRINT_OPTION print_option, Map<String,Integer> tax_code_to_id_map, Phylogeny phy)