X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2FAlignmentSorter.java;fp=src%2Fjalview%2Fanalysis%2FAlignmentSorter.java;h=6b8ea4abb3fd70426f3e078ab04e6d6be75cef45;hb=88bc41a8d340988625001b2828625c1a668cadd9;hp=693e7947f62fe281256ac8639894f43ff8e86a52;hpb=4efe5c8d36740fc15d862edd5b121c56df7f1c94;p=jalview.git diff --git a/src/jalview/analysis/AlignmentSorter.java b/src/jalview/analysis/AlignmentSorter.java index 693e794..6b8ea4a 100755 --- a/src/jalview/analysis/AlignmentSorter.java +++ b/src/jalview/analysis/AlignmentSorter.java @@ -109,8 +109,9 @@ public class AlignmentSorter true); for (int i = 0; i < nSeq; i++) { - scores[i] = (float) PIDModel.computePID(align.getSequenceAt(i) - .getSequenceAsString(), refSeq, pidParams); + scores[i] = (float) PIDModel.computePID( + align.getSequenceAt(i).getSequenceAsString(), refSeq, + pidParams); seqs[i] = align.getSequenceAt(i); } @@ -416,7 +417,8 @@ public class AlignmentSorter } else { - setReverseOrder(align, vectorSubsetToArray(tmp, align.getSequences())); + setReverseOrder(align, + vectorSubsetToArray(tmp, align.getSequences())); } } @@ -451,12 +453,9 @@ public class AlignmentSorter if (tmp.size() != nSeq) { - System.err - .println("WARNING: tmp.size()=" - + tmp.size() - + " != nseq=" - + nSeq - + " in getOrderByTree - tree contains sequences not in alignment"); + System.err.println("WARNING: tmp.size()=" + tmp.size() + " != nseq=" + + nSeq + + " in getOrderByTree - tree contains sequences not in alignment"); } } @@ -492,7 +491,8 @@ public class AlignmentSorter } else { - setReverseOrder(align, vectorSubsetToArray(tmp, align.getSequences())); + setReverseOrder(align, + vectorSubsetToArray(tmp, align.getSequences())); } } @@ -704,11 +704,10 @@ public class AlignmentSorter int start, int stop, AlignmentI alignment, String method) { sortByFeature( - featureLabel == null ? null - : Arrays.asList(new String[] { featureLabel }), - groupLabel == null ? null : Arrays - .asList(new String[] { groupLabel }), start, stop, - alignment, method); + featureLabel == null ? null : Arrays.asList(new String[] + { featureLabel }), + groupLabel == null ? null : Arrays.asList(new String[] + { groupLabel }), start, stop, alignment, method); } private static boolean containsIgnoreCase(final String lab, @@ -739,9 +738,8 @@ public class AlignmentSorter if (method != FEATURE_SCORE && method != FEATURE_LABEL && method != FEATURE_DENSITY) { - throw new Error( - MessageManager - .getString("error.implementation_error_sortbyfeature")); + throw new Error(MessageManager + .getString("error.implementation_error_sortbyfeature")); } boolean ignoreScore = method != FEATURE_SCORE; @@ -820,13 +818,12 @@ public class AlignmentSorter */ boolean noOverlap = seqs[i].findIndex(feature.getBegin()) > stop + 1 || seqs[i].findIndex(feature.getEnd()) < start + 1; - boolean skipFeatureType = featureLabels != null - && !AlignmentSorter.containsIgnoreCase(feature.type, - featureLabels); + boolean skipFeatureType = featureLabels != null && !AlignmentSorter + .containsIgnoreCase(feature.type, featureLabels); boolean skipFeatureGroup = groupLabels != null - && (feature.getFeatureGroup() != null && !AlignmentSorter - .containsIgnoreCase(feature.getFeatureGroup(), - groupLabels)); + && (feature.getFeatureGroup() != null + && !AlignmentSorter.containsIgnoreCase( + feature.getFeatureGroup(), groupLabels)); if (noOverlap || skipFeatureType || skipFeatureGroup) { // forget about this feature @@ -867,8 +864,9 @@ public class AlignmentSorter String[] labs = new String[fs.length]; for (int l = 0; l < labs.length; l++) { - labs[l] = (fs[l].getDescription() != null ? fs[l] - .getDescription() : fs[l].getType()); + labs[l] = (fs[l].getDescription() != null + ? fs[l].getDescription() + : fs[l].getType()); } QuickSort.sort(labs, ((Object[]) feats[i])); }