4 // FORESTER -- software libraries and applications
5 // for evolutionary biology research and applications.
7 // Copyright (C) 2008-2009 Christian M. Zmasek
8 // Copyright (C) 2008-2009 Burnham Institute for Medical Research
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.
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.
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
25 // Contact: phylosoft @ gmail . com
26 // WWW: www.phylosoft.org/forester
28 package org.forester.surfacing;
30 import java.util.SortedMap;
31 import java.util.SortedSet;
33 import org.forester.protein.BinaryDomainCombination;
34 import org.forester.protein.BinaryDomainCombination.DomainCombinationType;
35 import org.forester.protein.DomainId;
36 import org.forester.species.Species;
37 import org.forester.util.DescriptiveStatistics;
39 public interface GenomeWideCombinableDomains {
41 public boolean contains( DomainId key_id );
43 public CombinableDomains get( DomainId key_id );
45 public SortedMap<DomainId, CombinableDomains> getAllCombinableDomainsIds();
48 * This should return all domains ids present in the genome.
50 * @return a sorted set of domains ids
52 public SortedSet<DomainId> getAllDomainIds();
54 public DomainCombinationType getDomainCombinationType();
56 SortedSet<DomainId> getMostPromiscuosDomain();
59 * This should return a statistic for per domain
60 * promiscuity in a genome.
62 * @return descriptive statistics for per domain promiscuity in a genome
64 public DescriptiveStatistics getPerGenomeDomainPromiscuityStatistics();
68 public Species getSpecies();
71 * This should return all binary domain combinations present in the genome.
73 * @return a sorted set of binary domain combinations
75 public SortedSet<BinaryDomainCombination> toBinaryDomainCombinations();
77 public StringBuilder toStringBuilder( GenomeWideCombinableDomainsSortOrder order );
79 public static enum GenomeWideCombinableDomainsSortOrder {
80 ALPHABETICAL_KEY_ID, KEY_DOMAIN_PROTEINS_COUNT, KEY_DOMAIN_COUNT, COMBINATIONS_COUNT