git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'merges/develop_JAL2295setChimeraAttributes' into develop
[jalview.git]
/
src
/
jalview
/
analysis
/
AAFrequency.java
diff --git
a/src/jalview/analysis/AAFrequency.java
b/src/jalview/analysis/AAFrequency.java
index
e682e2c
..
ee16f94
100755
(executable)
--- a/
src/jalview/analysis/AAFrequency.java
+++ b/
src/jalview/analysis/AAFrequency.java
@@
-20,6
+20,10
@@
*/
package jalview.analysis;
*/
package jalview.analysis;
+import java.util.Arrays;
+import java.util.Hashtable;
+import java.util.List;
+
import jalview.datamodel.AlignedCodonFrame;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.AlignedCodonFrame;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
@@
-37,10
+41,6
@@
import jalview.util.Format;
import jalview.util.MappingUtils;
import jalview.util.QuickSort;
import jalview.util.MappingUtils;
import jalview.util.QuickSort;
-import java.util.Arrays;
-import java.util.Hashtable;
-import java.util.List;
-
/**
* Takes in a vector or array of sequences and column start and column end and
* returns a new Hashtable[] of size maxSeqLength, if Hashtable not supplied.
/**
* Takes in a vector or array of sequences and column start and column end and
* returns a new Hashtable[] of size maxSeqLength, if Hashtable not supplied.
@@
-67,8
+67,8
@@
public class AAFrequency
}
}
}
}
- public static final ProfilesI calculate(List<SequenceI> list,
- int start, int end)
+ public static final ProfilesI calculate(List<SequenceI> list, int start,
+ int end)
{
return calculate(list, start, end, false);
}
{
return calculate(list, start, end, false);
}
@@
-291,7
+291,7
@@
public class AAFrequency
/**
* Derive the gap count annotation row.
*
/**
* Derive the gap count annotation row.
*
- * @param consensus
+ * @param gaprow
* the annotation row to add annotations to
* @param profiles
* the source consensus data
* the annotation row to add annotations to
* @param profiles
* the source consensus data
@@
-300,12
+300,11
@@
public class AAFrequency
* @param endCol
* end column (exclusive)
*/
* @param endCol
* end column (exclusive)
*/
- public static void completeGapAnnot(AlignmentAnnotation consensus,
+ public static void completeGapAnnot(AlignmentAnnotation gaprow,
ProfilesI profiles, int startCol, int endCol, long nseq)
{
ProfilesI profiles, int startCol, int endCol, long nseq)
{
- // long now = System.currentTimeMillis();
- if (consensus == null || consensus.annotations == null
- || consensus.annotations.length < endCol)
+ if (gaprow == null || gaprow.annotations == null
+ || gaprow.annotations.length < endCol)
{
/*
* called with a bad alignment annotation row
{
/*
* called with a bad alignment annotation row
@@
-314,8
+313,8
@@
public class AAFrequency
return;
}
// always set ranges again
return;
}
// always set ranges again
- consensus.graphMax = nseq;
- consensus.graphMin = 0;
+ gaprow.graphMax = nseq;
+ gaprow.graphMin = 0;
for (int i = startCol; i < endCol; i++)
{
ProfileI profile = profiles.get(i);
for (int i = startCol; i < endCol; i++)
{
ProfileI profile = profiles.get(i);
@@
-325,18
+324,18
@@
public class AAFrequency
* happens if sequences calculated over were
* shorter than alignment width
*/
* happens if sequences calculated over were
* shorter than alignment width
*/
- consensus.annotations[i] = null;
+ gaprow.annotations[i] = null;
return;
}
return;
}
- final int gapped = profile.getGapped();
+ final int gapped = profile.getNonGapped();
- String description = "" + gapped;
+ String description = String.valueOf(gapped);
- consensus.annotations[i] = new Annotation(gapped);
+ gaprow.annotations[i] = new Annotation(description, description,
+ '\0',
+ gapped);
}
}
- // long elapsed = System.currentTimeMillis() - now;
- // System.out.println(-elapsed);
}
/**
}
/**
@@
-408,8
+407,7
@@
public class AAFrequency
* calculations
* @return
*/
* calculations
* @return
*/
- public static int[] extractProfile(ProfileI profile,
- boolean ignoreGaps)
+ public static int[] extractProfile(ProfileI profile, boolean ignoreGaps)
{
int[] rtnval = new int[64];
ResidueCount counts = profile.getCounts();
{
int[] rtnval = new int[64];
ResidueCount counts = profile.getCounts();