in progress
[jalview.git] / forester / java / src / org / forester / surfacing / CombinableDomains.java
1 // $Id:
2 //
3 // FORESTER -- software libraries and applications
4 // for evolutionary biology research and applications.
5 //
6 // Copyright (C) 2008-2009 Christian M. Zmasek
7 // Copyright (C) 2008-2009 Burnham Institute for Medical Research
8 // All rights reserved
9 //
10 // This library is free software; you can redistribute it and/or
11 // modify it under the terms of the GNU Lesser General Public
12 // License as published by the Free Software Foundation; either
13 // version 2.1 of the License, or (at your option) any later version.
14 //
15 // This library is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 //
24 // Contact: phylosoft @ gmail . com
25 // WWW: www.phylosoft.org/forester
26
27 package org.forester.surfacing;
28
29 import java.util.List;
30 import java.util.SortedMap;
31
32 import org.forester.protein.BinaryDomainCombination;
33 import org.forester.protein.DomainId;
34 import org.forester.species.Species;
35 import org.forester.util.DescriptiveStatistics;
36
37 public interface CombinableDomains {
38
39     /**
40      * To add a new combinable domain.
41      * 
42      * @param protein_domain
43      */
44     public void addCombinableDomain( final DomainId protein_domain );
45
46     /**
47      * 
48      * This must return all domains in this set of combinable domains (i.e.
49      * the key domain and all domains which can combine with the key domain).
50      * 
51      *  @return all domains
52      */
53     List<DomainId> getAllDomains();
54
55     List<DomainId> getCombinableDomains();
56
57     /**
58      * Returns the combinable domain identifiers sorted in alphabetical manner: -
59      * keys are the combinable domain identifiers - values are the counts of
60      * proteins exhibiting a particular combination
61      * 
62      * @return combining domain identifiers sorted in alphabetical manner
63      */
64     public SortedMap<DomainId, Integer> getCombinableDomainsIds();
65
66     public StringBuilder getCombiningDomainIdsAsStringBuilder();
67
68     /**
69      * Returns the domain whose combinable domains are in stored in this
70      * combinable domains.
71      * 
72      * @return the domain identifier
73      */
74     public DomainId getKeyDomain();
75
76     /**
77      * Gets descriptive statistics for the confidence (i.e. E-values) of the key
78      * domain.
79      * 
80      * 
81      * @return descriptive statistics for the confidence of the key domain
82      */
83     public DescriptiveStatistics getKeyDomainConfidenceDescriptiveStatistics();
84
85     /**
86      * Returns how many times the key domain is present in a given species
87      * genome.
88      * 
89      * @return key domain count in species
90      */
91     public int getKeyDomainCount();
92
93     /**
94      * Returns how many proteins with the key domain are present in a given
95      * species genome.
96      * 
97      * @return key domain proteins count in species
98      */
99     public int getKeyDomainProteinsCount();
100
101     public int getNumberOfCombinableDomains();
102
103     public int getNumberOfProteinsExhibitingCombination( final DomainId protein_domain );
104
105     /**
106      * Returns the species of this combinable domains.
107      * 
108      * @return the species
109      */
110     public Species getSpecies();
111
112     public boolean isCombinable( final DomainId protein_domain );
113
114     /**
115      * This is to set descriptive statistics for the confidence (i.e. E-values)
116      * of the key domain.
117      * 
118      * 
119      * @param statistics
120      */
121     void setKeyDomainConfidenceDescriptiveStatistics( final DescriptiveStatistics statistics );
122
123     /**
124      * Sets how many times the key domain is present in a given species genome.
125      * 
126      * @param key_domain_count
127      *            key domain count in species
128      */
129     void setKeyDomainCount( final int key_domain_count );
130
131     /**
132      * Sets how many proteins with the key domain are present in a given species
133      * genome.
134      * 
135      * @param key_domain_proteins_count
136      *            key domain protein count in species
137      */
138     void setKeyDomainProteinsCount( final int key_domain_proteins_count );
139
140     public List<BinaryDomainCombination> toBinaryDomainCombinations();
141 }