inprogress
[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: https://sites.google.com/site/cmzmasek/home/software/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.species.Species;
34 import org.forester.util.DescriptiveStatistics;
35
36 public interface CombinableDomains {
37
38     /**
39      * To add a new combinable domain.
40      * 
41      * @param protein_domain
42      */
43     public void addCombinableDomain( final String protein_domain );
44
45     /**
46      * 
47      * This must return all domains in this set of combinable domains (i.e.
48      * the key domain and all domains which can combine with the key domain).
49      * 
50      *  @return all domains
51      */
52     List<String> getAllDomains();
53
54     List<String> getCombinableDomains();
55
56     /**
57      * Returns the combinable domain identifiers sorted in alphabetical manner: -
58      * keys are the combinable domain identifiers - values are the counts of
59      * proteins exhibiting a particular combination
60      * 
61      * @return combining domain identifiers sorted in alphabetical manner
62      */
63     public SortedMap<String, Integer> getCombinableDomainsIds();
64
65     public StringBuilder getCombiningDomainIdsAsStringBuilder();
66
67     /**
68      * Returns the domain whose combinable domains are in stored in this
69      * combinable domains.
70      * 
71      * @return the domain identifier
72      */
73     public String getKeyDomain();
74
75     /**
76      * Gets descriptive statistics for the confidence (i.e. E-values) of the key
77      * domain.
78      * 
79      * 
80      * @return descriptive statistics for the confidence of the key domain
81      */
82     public DescriptiveStatistics getKeyDomainConfidenceDescriptiveStatistics();
83
84     /**
85      * Returns how many times the key domain is present in a given species
86      * genome.
87      * 
88      * @return key domain count in species
89      */
90     public int getKeyDomainCount();
91
92     /**
93      * Returns how many proteins with the key domain are present in a given
94      * species genome.
95      * 
96      * @return key domain proteins count in species
97      */
98     public int getKeyDomainProteinsCount();
99
100     public int getNumberOfCombinableDomains();
101
102     public int getNumberOfProteinsExhibitingCombination( final String protein_domain );
103
104     /**
105      * Returns the species of this combinable domains.
106      * 
107      * @return the species
108      */
109     public Species getSpecies();
110
111     public boolean isCombinable( final String protein_domain );
112
113     /**
114      * This is to set descriptive statistics for the confidence (i.e. E-values)
115      * of the key domain.
116      * 
117      * 
118      * @param statistics
119      */
120     void setKeyDomainConfidenceDescriptiveStatistics( final DescriptiveStatistics statistics );
121
122     /**
123      * Sets how many times the key domain is present in a given species genome.
124      * 
125      * @param key_domain_count
126      *            key domain count in species
127      */
128     void setKeyDomainCount( final int key_domain_count );
129
130     /**
131      * Sets how many proteins with the key domain are present in a given species
132      * genome.
133      * 
134      * @param key_domain_proteins_count
135      *            key domain protein count in species
136      */
137     void setKeyDomainProteinsCount( final int key_domain_proteins_count );
138
139     public List<BinaryDomainCombination> toBinaryDomainCombinations();
140 }