inprogress
[jalview.git] / forester / java / src / org / forester / surfacing / GenomeWideCombinableDomains.java
1 // $Id:
2 // $
3 //
4 // FORESTER -- software libraries and applications
5 // for evolutionary biology research and applications.
6 //
7 // Copyright (C) 2008-2009 Christian M. Zmasek
8 // Copyright (C) 2008-2009 Burnham Institute for Medical Research
9 // All rights reserved
10 //
11 // This library is free software; you can redistribute it and/or
12 // modify it under the terms of the GNU Lesser General Public
13 // License as published by the Free Software Foundation; either
14 // version 2.1 of the License, or (at your option) any later version.
15 //
16 // This library is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 // Lesser General Public License for more details.
20 //
21 // You should have received a copy of the GNU Lesser General Public
22 // License along with this library; if not, write to the Free Software
23 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24 //
25 // Contact: phylosoft @ gmail . com
26 // WWW: https://sites.google.com/site/cmzmasek/home/software/forester
27
28 package org.forester.surfacing;
29
30 import java.util.SortedMap;
31 import java.util.SortedSet;
32
33 import org.forester.protein.BinaryDomainCombination;
34 import org.forester.protein.BinaryDomainCombination.DomainCombinationType;
35 import org.forester.species.Species;
36 import org.forester.util.DescriptiveStatistics;
37
38 public interface GenomeWideCombinableDomains {
39
40     public boolean contains( String key_id );
41
42     public CombinableDomains get( String key_id );
43
44     public SortedMap<String, CombinableDomains> getAllCombinableDomainsIds();
45
46     /**
47      * This should return all domains ids present in the genome.
48      * 
49      * @return a sorted set of domains ids
50      */
51     public SortedSet<String> getAllDomainIds();
52
53     public DomainCombinationType getDomainCombinationType();
54
55     SortedSet<String> getMostPromiscuosDomain();
56
57     /**
58      * This should return a statistic for per domain 
59      * promiscuity in a genome.
60      * 
61      * @return descriptive statistics for per domain promiscuity in a genome
62      */
63     public DescriptiveStatistics getPerGenomeDomainPromiscuityStatistics();
64
65     public int getSize();
66
67     public Species getSpecies();
68
69     /**
70      * This should return all binary domain combinations present in the genome.
71      * 
72      * @return a sorted set of binary domain combinations
73      */
74     public SortedSet<BinaryDomainCombination> toBinaryDomainCombinations();
75
76     public StringBuilder toStringBuilder( GenomeWideCombinableDomainsSortOrder order );
77
78     public static enum GenomeWideCombinableDomainsSortOrder {
79         ALPHABETICAL_KEY_ID, KEY_DOMAIN_PROTEINS_COUNT, KEY_DOMAIN_COUNT, COMBINATIONS_COUNT
80     }
81 }