X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Fsurfacing%2FDomainLengthsTable.java;h=44b62474e33e34a84063bb046e159a1a2789d348;hb=d4d61f9d2969283e821f650d031c169899fb3870;hp=4b6ca22e0ca9adfb00929fc32c346325519be0ff;hpb=48f7a89be9d34f1930a1f863e608235cc27184c5;p=jalview.git diff --git a/forester/java/src/org/forester/surfacing/DomainLengthsTable.java b/forester/java/src/org/forester/surfacing/DomainLengthsTable.java index 4b6ca22..44b6247 100644 --- a/forester/java/src/org/forester/surfacing/DomainLengthsTable.java +++ b/forester/java/src/org/forester/surfacing/DomainLengthsTable.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2010 Christian M. Zmasek // Copyright (C) 2008-2010 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,13 +16,13 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // 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; @@ -32,18 +32,21 @@ import java.util.List; import java.util.SortedMap; import java.util.TreeMap; +import org.forester.protein.Domain; +import org.forester.protein.Protein; +import org.forester.species.Species; import org.forester.util.BasicDescriptiveStatistics; import org.forester.util.DescriptiveStatistics; import org.forester.util.ForesterUtil; public class DomainLengthsTable { - private final static DecimalFormat DF = new DecimalFormat( "#.0" ); - final SortedMap _domain_lengths; - final List _species; + private final static DecimalFormat DF = new DecimalFormat( "#.0" ); + final SortedMap _domain_lengths; + final List _species; public DomainLengthsTable() { - _domain_lengths = new TreeMap(); + _domain_lengths = new TreeMap(); _species = new ArrayList(); } @@ -55,7 +58,7 @@ public class DomainLengthsTable { getDomainLengths().put( domain_lengths.getDomainId(), domain_lengths ); } - private void addLength( final DomainId domain_id, final Species species, final int domain_length ) { + private void addLength( final String domain_id, final Species species, final int domain_length ) { if ( !getDomainLengths().containsKey( domain_id ) ) { addDomainLengths( new DomainLengths( domain_id ) ); } @@ -83,7 +86,7 @@ public class DomainLengthsTable { return stats; } - public DescriptiveStatistics calculateMeanBasedStatisticsForDomain( final DomainId domain_id ) { + public DescriptiveStatistics calculateMeanBasedStatisticsForDomain( final String domain_id ) { return getDomainLengths( domain_id ).calculateMeanBasedStatistics(); } @@ -139,11 +142,11 @@ public class DomainLengthsTable { return sb; } - private SortedMap getDomainLengths() { + private SortedMap getDomainLengths() { return _domain_lengths; } - public DomainLengths getDomainLengths( final DomainId domain_id ) { + public DomainLengths getDomainLengths( final String domain_id ) { return getDomainLengths().get( domain_id ); } @@ -155,7 +158,7 @@ public class DomainLengthsTable { return list; } - public DescriptiveStatistics getLengthStatistic( final DomainId domain_id, final Species species ) { + public DescriptiveStatistics getLengthStatistic( final String domain_id, final Species species ) { return getDomainLengths( domain_id ).getLengthStatistic( species ); }