X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Fsurfacing%2FDomainLengths.java;h=5bb71cfef62397e027e3a2b37e6cbdad61b6e307;hb=0be91180a6625d0a5b2c28fb6ff66dfd072ac882;hp=37ebfdc1ac914778ab29f74fdeec4e41eb6af0e8;hpb=73c5b11c1a00e539afb246e345ebf3f042dded78;p=jalview.git diff --git a/forester/java/src/org/forester/surfacing/DomainLengths.java b/forester/java/src/org/forester/surfacing/DomainLengths.java index 37ebfdc..5bb71cf 100644 --- a/forester/java/src/org/forester/surfacing/DomainLengths.java +++ b/forester/java/src/org/forester/surfacing/DomainLengths.java @@ -22,7 +22,7 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // // Contact: phylosoft @ gmail . com -// WWW: www.phylosoft.org/forester +// WWW: https://sites.google.com/site/cmzmasek/home/software/forester package org.forester.surfacing; @@ -31,17 +31,16 @@ import java.util.List; import java.util.SortedMap; import java.util.TreeMap; -import org.forester.protein.DomainId; import org.forester.species.Species; import org.forester.util.BasicDescriptiveStatistics; import org.forester.util.DescriptiveStatistics; public class DomainLengths { - final DomainId _domain_id; + final String _domain_id; final SortedMap _length_statistics; - public DomainLengths( final DomainId domain_id ) { + public DomainLengths( final String domain_id ) { _domain_id = domain_id; _length_statistics = new TreeMap(); } @@ -53,13 +52,6 @@ public class DomainLengths { getLengthStatistic( species ).addValue( domain_length ); } - private void addLengthStatistics( final Species species, final DescriptiveStatistics length_statistic ) { - if ( getLengthStatistics().containsKey( species ) ) { - throw new IllegalArgumentException( "length statistics for [" + species.getSpeciesId() + "] already added" ); - } - getLengthStatistics().put( species, length_statistic ); - } - /** * Returns descriptive statistics based on the arithmetic means * for each species. @@ -91,7 +83,7 @@ public class DomainLengths { return ( species_mean - population_mean ) / population_sd; } - public DomainId getDomainId() { + public String getDomainId() { return _domain_id; } @@ -99,10 +91,6 @@ public class DomainLengths { return getLengthStatistics().get( species ); } - private SortedMap getLengthStatistics() { - return _length_statistics; - } - public List getLengthStatisticsList() { final List list = new ArrayList(); for( final DescriptiveStatistics stats : _length_statistics.values() ) { @@ -142,4 +130,15 @@ public class DomainLengths { public boolean isHasLengthStatistic( final Species species ) { return getLengthStatistics().containsKey( species ); } + + private void addLengthStatistics( final Species species, final DescriptiveStatistics length_statistic ) { + if ( getLengthStatistics().containsKey( species ) ) { + throw new IllegalArgumentException( "length statistics for [" + species.getSpeciesId() + "] already added" ); + } + getLengthStatistics().put( species, length_statistic ); + } + + private SortedMap getLengthStatistics() { + return _length_statistics; + } }