X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2FAAFrequency.java;h=6bdffe197053b0d324eafd00e0b735fb8ef4d7b3;hb=cd8f0eb5083ecbb73bde4b87c45e0d4286998ab9;hp=61e11c4ec70f9da32b93ae5259cae2f4f7ce4019;hpb=d94db336381e48d9155736ca4ea058d9f747439c;p=jalview.git diff --git a/src/jalview/analysis/AAFrequency.java b/src/jalview/analysis/AAFrequency.java index 61e11c4..6bdffe1 100755 --- a/src/jalview/analysis/AAFrequency.java +++ b/src/jalview/analysis/AAFrequency.java @@ -20,12 +20,15 @@ */ package jalview.analysis; -import jalview.analysis.ResidueCount.SymbolCounts; import jalview.datamodel.AlignedCodonFrame; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; import jalview.datamodel.Annotation; +import jalview.datamodel.Profile; +import jalview.datamodel.ProfileI; +import jalview.datamodel.ResidueCount; import jalview.datamodel.SequenceI; +import jalview.datamodel.ResidueCount.SymbolCounts; import jalview.ext.android.SparseIntArray; import jalview.util.Comparison; import jalview.util.Format; @@ -62,13 +65,13 @@ public class AAFrequency } } - public static final Profile[] calculate(List list, + public static final ProfileI[] calculate(List list, int start, int end) { return calculate(list, start, end, false); } - public static final Profile[] calculate(List sequences, + public static final ProfileI[] calculate(List sequences, int start, int end, boolean profile) { SequenceI[] seqs = new SequenceI[sequences.size()]; @@ -84,7 +87,7 @@ public class AAFrequency } } - Profile[] reply = new Profile[width]; + ProfileI[] reply = new ProfileI[width]; if (end >= width) { @@ -110,7 +113,7 @@ public class AAFrequency * if true, store all symbol counts */ public static final void calculate(final SequenceI[] sequences, - int start, int end, Profile[] result, boolean saveFullProfile) + int start, int end, ProfileI[] result, boolean saveFullProfile) { // long now = System.currentTimeMillis(); int seqCount = sequences.length; @@ -170,7 +173,7 @@ public class AAFrequency int maxCount = residueCounts.getModalCount(); String maxResidue = residueCounts.getResiduesForCount(maxCount); int gapCount = residueCounts.getGapCount(); - Profile profile = new Profile(seqCount, gapCount, maxCount, + ProfileI profile = new Profile(seqCount, gapCount, maxCount, maxResidue); if (saveFullProfile) @@ -231,7 +234,7 @@ public class AAFrequency * number of sequences */ public static void completeConsensus(AlignmentAnnotation consensus, - Profile[] profiles, int iStart, int width, boolean ignoreGaps, + ProfileI[] profiles, int iStart, int width, boolean ignoreGaps, boolean showSequenceLogo, long nseq) { // long now = System.currentTimeMillis(); @@ -249,7 +252,7 @@ public class AAFrequency for (int i = iStart; i < width; i++) { - Profile profile; + ProfileI profile; if (i >= profiles.length || ((profile = profiles[i]) == null)) { /* @@ -299,7 +302,7 @@ public class AAFrequency * the number of decimal places to format percentages to * @return */ - static String getTooltip(Profile profile, float pid, + static String getTooltip(ProfileI profile, float pid, boolean showSequenceLogo, boolean ignoreGaps, int dp) { ResidueCount counts = profile.getCounts(); @@ -350,7 +353,7 @@ public class AAFrequency * calculations * @return */ - public static int[] extractProfile(Profile profile, + public static int[] extractProfile(ProfileI profile, boolean ignoreGaps) { int[] rtnval = new int[64];