X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2FAAFrequency.java;h=6bdffe197053b0d324eafd00e0b735fb8ef4d7b3;hb=494a321d41897be1492b973fdb37fa4ccb0ec94e;hp=30d53737cda0309f04a4ed591563656f30177356;hpb=66fd250940f151ec8b2322d98d6bb9627bdc516f;p=jalview.git diff --git a/src/jalview/analysis/AAFrequency.java b/src/jalview/analysis/AAFrequency.java index 30d5373..6bdffe1 100755 --- a/src/jalview/analysis/AAFrequency.java +++ b/src/jalview/analysis/AAFrequency.java @@ -25,6 +25,7 @@ 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; @@ -64,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()]; @@ -86,7 +87,7 @@ public class AAFrequency } } - Profile[] reply = new Profile[width]; + ProfileI[] reply = new ProfileI[width]; if (end >= width) { @@ -112,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; @@ -172,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) @@ -233,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(); @@ -251,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)) { /* @@ -301,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(); @@ -352,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];