3 // FORESTER -- software libraries and applications
4 // for evolutionary biology research and applications.
6 // Copyright (C) 2008-2009 Christian M. Zmasek
7 // Copyright (C) 2008-2009 Burnham Institute for Medical Research
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.
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.
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
24 // Contact: phylosoft @ gmail . com
25 // WWW: https://sites.google.com/site/cmzmasek/home/software/forester
27 package org.forester.surfacing;
29 import java.util.List;
31 import java.util.SortedMap;
33 import org.forester.protein.BinaryDomainCombination;
34 import org.forester.species.Species;
36 public interface CombinableDomains {
39 * To add a new combinable domain.
41 * @param protein_domain
43 public void addCombinableDomain( final String protein_domain );
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).
52 List<String> getAllDomains();
54 List<String> getCombinableDomains();
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
61 * @return combining domain identifiers sorted in alphabetical manner
63 public SortedMap<String, Integer> getCombinableDomainsIds();
65 public StringBuilder getCombiningDomainIdsAsStringBuilder();
68 * Returns the domain whose combinable domains are in stored in this
71 * @return the domain identifier
73 public String getKeyDomain();
76 * Returns how many times the key domain is present in a given species
79 * @return key domain count in species
81 public int getKeyDomainCount();
84 * Returns how many proteins with the key domain are present in a given
87 * @return key domain proteins count in species
89 public int getKeyDomainProteinsCount();
91 public Set<String> getKeyDomainProteins();
93 public int getNumberOfCombinableDomains();
95 public int getNumberOfProteinsExhibitingCombination( final String protein_domain );
98 * Returns the species of this combinable domains.
100 * @return the species
102 public Species getSpecies();
104 public boolean isCombinable( final String protein_domain );
107 * Sets how many times the key domain is present in a given species genome.
109 * @param key_domain_count
110 * key domain count in species
112 void setKeyDomainCount( final int key_domain_count );
114 public List<BinaryDomainCombination> toBinaryDomainCombinations();
116 void addKeyDomainProtein( String protein );