X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Fsurfacing%2FDomainSimilarity.java;h=5a0735e3a162489a05c4b164eb368e6e1a260ca2;hb=eae9b4d545845ccc94c1465c1664086b22188ad1;hp=bdf227cbf4bd27d966852c1937fc00c672aecc57;hpb=48f7a89be9d34f1930a1f863e608235cc27184c5;p=jalview.git diff --git a/forester/java/src/org/forester/surfacing/DomainSimilarity.java b/forester/java/src/org/forester/surfacing/DomainSimilarity.java index bdf227c..5a0735e 100644 --- a/forester/java/src/org/forester/surfacing/DomainSimilarity.java +++ b/forester/java/src/org/forester/surfacing/DomainSimilarity.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,28 +16,41 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // // Contact: phylosoft @ gmail . com -// WWW: www.phylosoft.org/forester +// WWW: https://sites.google.com/site/cmzmasek/home/software/forester package org.forester.surfacing; +import java.util.Map; import java.util.SortedMap; import java.util.SortedSet; +import org.forester.phylogeny.Phylogeny; +import org.forester.species.Species; +import org.forester.surfacing.PrintableDomainSimilarity.PRINT_OPTION; + /* * This is to represent a measure of similarity between two or more domains from * different genomes. */ public interface DomainSimilarity extends Comparable { - public SortedSet getCombinableDomainIds( final Species species_of_combinable_domain );; + static public enum DomainSimilarityScoring { + DOMAINS, PROTEINS, COMBINATIONS; + } + + public static enum DomainSimilaritySortField { + MIN, MAX, SD, MEAN, ABS_MAX_COUNTS_DIFFERENCE, MAX_COUNTS_DIFFERENCE, MAX_DIFFERENCE, SPECIES_COUNT, DOMAIN_ID, + } - public DomainId getDomainId(); + public SortedSet getCombinableDomainIds( final Species species_of_combinable_domain ); + + public String getDomainId(); /** * For pairwise similarities, this should return the "difference"; for example the difference in counts @@ -85,17 +98,11 @@ public interface DomainSimilarity extends Comparable { * * @return SortedMap */ - public SortedMap getSpeciesData(); + public SortedMap getSpeciesData(); public double getStandardDeviationOfSimilarityScore(); - public StringBuffer toStringBuffer( final PrintableDomainSimilarity.PRINT_OPTION print_option ); - - static public enum DomainSimilarityScoring { - DOMAINS, PROTEINS, COMBINATIONS; - } - - public static enum DomainSimilaritySortField { - MIN, MAX, SD, MEAN, ABS_MAX_COUNTS_DIFFERENCE, MAX_COUNTS_DIFFERENCE, MAX_DIFFERENCE, SPECIES_COUNT, DOMAIN_ID, - } + public StringBuffer toStringBuffer( PRINT_OPTION print_option, + Map tax_code_to_id_map, + Phylogeny phy ); }