git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7a293d1
)
linear interpolation between sparse annotation element values.
VamJalview
author
jprocter
<Jim Procter>
Mon, 25 Sep 2006 14:05:41 +0000
(14:05 +0000)
committer
jprocter
<Jim Procter>
Mon, 25 Sep 2006 14:05:41 +0000
(14:05 +0000)
src/jalview/io/VamsasDatastore.java
patch
|
blob
|
history
diff --git
a/src/jalview/io/VamsasDatastore.java
b/src/jalview/io/VamsasDatastore.java
index
c9d5994
..
4b7445a
100755
(executable)
--- a/
src/jalview/io/VamsasDatastore.java
+++ b/
src/jalview/io/VamsasDatastore.java
@@
-1285,8
+1285,22
@@
public class VamsasDatastore {
// make bounds and automatic description strings for jalview user's benefit (these shouldn't be written back to vamsas document)
boolean first=true;
float min=0,max=1;
// make bounds and automatic description strings for jalview user's benefit (these shouldn't be written back to vamsas document)
boolean first=true;
float min=0,max=1;
+ int lastval=0;
for (int i=0;i<arow.length; i++) {
if (arow[i]!=null) {
for (int i=0;i<arow.length; i++) {
if (arow[i]!=null) {
+ if (i-lastval>1) {
+ // do some interpolation *between* points
+ if (arow[lastval]!=null) {
+ float interval = arow[i].value-arow[lastval].value;
+ interval/=i-lastval;
+ float base = arow[lastval].value;
+ for (int ip=lastval+1,np=0; ip<i; np++,ip++) {
+ arow[ip] = new jalview.datamodel.Annotation("","",' ', interval*np+base);
+ // NB - Interpolated points don't get a tooltip and description.
+ }
+ }
+ }
+ lastval=i;
// check range - shouldn't we have a min and max property in the annotation object ?
if (first) { min=max=arow[i].value; first=false;}
else { if (arow[i].value<min) { min=arow[i].value; }
// check range - shouldn't we have a min and max property in the annotation object ?
if (first) { min=max=arow[i].value; first=false;}
else { if (arow[i].value<min) { min=arow[i].value; }
@@
-1295,7
+1309,7
@@
public class VamsasDatastore {
// make tooltip and display char value
if (!has[HASDESCSTR]) arow[i].description = arow[i].value + "";
if (!has[HASDC]) arow[i].displayCharacter=arow[i].value+"";
// make tooltip and display char value
if (!has[HASDESCSTR]) arow[i].description = arow[i].value + "";
if (!has[HASDC]) arow[i].displayCharacter=arow[i].value+"";
- }
+ }
}
int type=jalview.datamodel.AlignmentAnnotation.LINE_GRAPH;
if (has[HASHPHOB]) {
}
int type=jalview.datamodel.AlignmentAnnotation.LINE_GRAPH;
if (has[HASHPHOB]) {